Module ra_ap_hir_ty::autoderef

source ·
Expand description

In certain situations, rust automatically inserts derefs as necessary: for example, field accesses foo.bar still work when foo is actually a reference to a type with the field bar. This is an approximation of the logic in rustc (which lives in rustc_hir_analysis/check/autoderef.rs).

Functions§

  • Returns types that ty transitively dereferences to. This function is only meant to be used outside hir-ty.