pub fn normalize_shallow(&mut self, leaf: &Ty, binders: usize) -> Option<Ty> {
        leaf.var()
            .and_then(|depth| {
                if depth < binders {
                    None // bound variable, not an inference var
                } else {
                    let var = InferenceVariable::from_depth(depth - binders);
                    match self.unify.probe_value(var) {
                        InferenceValue::Unbound(_) => None,
                        InferenceValue::Bound(ref val) => {
                            let ty = val.as_ref().ty().unwrap();
                            Some(ty.up_shift(binders))
                        }
                    }
                }
            })
    }
/// If type `leaf` is a free inference variable, and that variable has been
/// bound, returns `Some(T)` where `T` is the type to which it has been bound.
///
/// `binders` is the number of binders under which `leaf` appears;
/// the return value will also be shifted accordingly so that it
/// can appear under that same number of binders.


`binders` is the number of binders under which `leaf` appears;
the return value will also be shifted accordingly so that it
can appear under that same number of binders.
` binders ` is the number of binders under which ` leaf ` appears ; the return value will also be shifted accordingly so that it can appear under that same number of binders .
pub fn normalize_shallow(&mut self, leaf: &Ty, binders: usize) -> Option<Ty> {
        leaf.var()
            .and_then(|depth| {
                if depth < binders {
                    None // bound variable, not an inference var
                } else {
                    let var = InferenceVariable::from_depth(depth - binders);
                    match self.unify.probe_value(var) {
                        InferenceValue::Unbound(_) => None,
                        InferenceValue::Bound(ref val) => {
                            let ty = val.as_ref().ty().unwrap();
                            Some(ty.up_shift(binders))
                        }
                    }
                }
            })
    }
pub fn normalize_shallow ( & mut self , leaf : & Ty , binders : usize ) -> Option < Ty > { leaf . var ( ) . and_then ( | depth | { if depth < binders { None // bound variable, not an inference var } else { let var = InferenceVariable :: from_depth ( depth - binders ) ; match self . unify . probe_value ( var ) { InferenceValue :: Unbound ( _ ) => None , InferenceValue :: Bound ( ref val ) => { let ty = val . as_ref ( ) . ty ( ) . unwrap ( ) ; Some ( ty . up_shift ( binders ) ) } } } } ) }
If type `leaf` is a free inference variable, and that variable has been
bound, returns `Some(T)` where `T` is the type to which it has been bound.
If type ` leaf ` is a free inference variable and that variable has been bound returns ` Some ( T ) ` where ` T ` is the type to which it has been bound .
&mut self
leaf
&Ty
binders
usize