// Returns the type and mutability of *ty.
//
// The parameter `explicit` indicates if this is an *explicit* dereference.
// Some types---notably unsafe ptrs---can only be dereferenced explicitly.
Returns the type and mutability of *ty.
The parameter `explicit` indicates if this is an *explicit* dereference.
Returns the type and mutability of * ty . The parameter ` explicit ` indicates if this is an * explicit * dereference .
pub fn builtin_deref(&self, explicit: bool, pref: LvaluePreference)
        -> Option<TypeAndMut<'tcx>>
    {
        match self.sty {
            TyBox(ty) => {
                Some(TypeAndMut {
                    ty: ty,
                    mutbl:
                        if pref == PreferMutLvalue { hir::MutMutable } else { hir::MutImmutable },
                })
            },
            TyRef(_, mt) => Some(mt),
            TyRawPtr(mt) if explicit => Some(mt),
            _ => None
        }
    }
pub fn builtin_deref ( & self , explicit : bool , pref : LvaluePreference ) -> Option < TypeAndMut < ' tcx > > { match self . sty { TyBox ( ty ) => { Some ( TypeAndMut { ty : ty , mutbl : if pref == PreferMutLvalue { hir :: MutMutable } else { hir :: MutImmutable } , } ) } , TyRef ( _ , mt ) => Some ( mt ) , TyRawPtr ( mt ) if explicit => Some ( mt ) , _ => None } }
Returns the type and mutability of *ty.
Returns the type and mutability of * ty .
&self
explicit
bool
pref
LvaluePreference