Function rustc_trans::middle::typeck::check::autoderefExperimental [-]  [+] [src]

pub fn autoderef<T>(fcx: &FnCtxt<'a, 'tcx>, sp: Span, base_ty: &'tcx TyS<'tcx>, expr_id: Option<u32>, lvalue_pref: LvaluePreference, should_stop: |&'tcx TyS<'tcx>, uint| -> Option<T>) -> (&'tcx TyS<'tcx>, uint, Option<T>)

Executes an autoderef loop for the type t. At each step, invokes should_stop to decide whether to terminate the loop. Returns the final type and number of derefs that it performed.

Note: this method does not modify the adjustments table. The caller is responsible for inserting an AutoAdjustment record into the fcx using one of the suitable methods.