fn restrict(&mut self, ty: Ty<'tcx>,
                tcx: TyCtxt<'a, 'tcx, 'tcx>,
                param_env: &ty::ParameterEnvironment<'tcx>) {
        if !ty.type_contents(tcx).interior_unsafe() {
            *self = *self - Qualif::MUTABLE_INTERIOR;
        }
        if !tcx.type_needs_drop_given_env(ty, param_env) {
            *self = *self - Qualif::NEEDS_DROP;
        }
    }
/// Remove flags which are impossible for the given type.
Remove flags which are impossible for the given type.
Remove flags which are impossible for the given type .
fn restrict(&mut self, ty: Ty<'tcx>,
                tcx: TyCtxt<'a, 'tcx, 'tcx>,
                param_env: &ty::ParameterEnvironment<'tcx>) {
        if !ty.type_contents(tcx).interior_unsafe() {
            *self = *self - Qualif::MUTABLE_INTERIOR;
        }
        if !tcx.type_needs_drop_given_env(ty, param_env) {
            *self = *self - Qualif::NEEDS_DROP;
        }
    }
fn restrict ( & mut self , ty : Ty < ' tcx > , tcx : TyCtxt < ' a , ' tcx , ' tcx > , param_env : & ty :: ParameterEnvironment < ' tcx > ) { if ! ty . type_contents ( tcx ) . interior_unsafe ( ) { * self = * self - Qualif :: MUTABLE_INTERIOR ; } if ! tcx . type_needs_drop_given_env ( ty , param_env ) { * self = * self - Qualif :: NEEDS_DROP ; } }
Remove flags which are impossible for the given type.
Remove flags which are impossible for the given type .
&mut self
ty
Ty<'tcx>
tcx
TyCtxt<'a, 'tcx, 'tcx>
param_env
&ty::ParameterEnvironment<'tcx>
&mut self
ty
Ty<'tcx>
tcx
TyCtxt<'a, 'tcx, 'tcx>
param_env
&ty::ParameterEnvironment<'tcx>