@@ -131,8 +131,8 @@ impl<'tcx> NewPermission {
131131 kind : RetagKind ,
132132 cx : & crate :: MiriInterpCx < ' tcx > ,
133133 ) -> Option < Self > {
134- let ty_is_freeze = pointee. is_freeze ( * cx. tcx , cx. typing_env ( ) ) ;
135- let ty_is_unpin = pointee. is_unpin ( * cx. tcx , cx. typing_env ( ) ) ;
134+ let ty_is_freeze = pointee. is_freeze ( * cx. tcx , cx. typing_env ) ;
135+ let ty_is_unpin = pointee. is_unpin ( * cx. tcx , cx. typing_env ) ;
136136 let is_protected = kind == RetagKind :: FnEntry ;
137137 // As demonstrated by `tests/fail/tree_borrows/reservedim_spurious_write.rs`,
138138 // interior mutability and protectors interact poorly.
@@ -163,10 +163,10 @@ impl<'tcx> NewPermission {
163163 zero_size : bool ,
164164 ) -> Option < Self > {
165165 let pointee = ty. builtin_deref ( true ) . unwrap ( ) ;
166- pointee. is_unpin ( * cx. tcx , cx. typing_env ( ) ) . then_some ( ( ) ) . map ( |( ) | {
166+ pointee. is_unpin ( * cx. tcx , cx. typing_env ) . then_some ( ( ) ) . map ( |( ) | {
167167 // Regular `Unpin` box, give it `noalias` but only a weak protector
168168 // because it is valid to deallocate it within the function.
169- let ty_is_freeze = ty. is_freeze ( * cx. tcx , cx. typing_env ( ) ) ;
169+ let ty_is_freeze = ty. is_freeze ( * cx. tcx , cx. typing_env ) ;
170170 let protected = kind == RetagKind :: FnEntry ;
171171 let initial_state = Permission :: new_reserved ( ty_is_freeze, protected) ;
172172 Self {
@@ -520,7 +520,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
520520 // Note: if we were to inline `new_reserved` below we would find out that
521521 // `ty_is_freeze` is eventually unused because it appears in a `ty_is_freeze || true`.
522522 // We are nevertheless including it here for clarity.
523- let ty_is_freeze = place. layout . ty . is_freeze ( * this. tcx , this. typing_env ( ) ) ;
523+ let ty_is_freeze = place. layout . ty . is_freeze ( * this. tcx , this. typing_env ) ;
524524 // Retag it. With protection! That is the entire point.
525525 let new_perm = NewPermission {
526526 initial_state : Permission :: new_reserved ( ty_is_freeze, /* protected */ true ) ,
0 commit comments