Function rustc::middle::typeck::check::autoderef[src]

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