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

pub fn autoderef<'a, 'tcx, T>(fcx: &FnCtxt<'a, 'tcx>, sp: Span, base_ty: Ty<'tcx>, expr_id: Option<NodeId>, lvalue_pref: LvaluePreference, should_stop: |Ty<'tcx>, uint| -> Option<T>) -> (Ty<'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.