@@ -131,8 +131,8 @@ impl<'tcx> NewPermission {
131
131
kind : RetagKind ,
132
132
cx : & crate :: MiriInterpCx < ' tcx > ,
133
133
) -> 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 ) ;
136
136
let is_protected = kind == RetagKind :: FnEntry ;
137
137
// As demonstrated by `tests/fail/tree_borrows/reservedim_spurious_write.rs`,
138
138
// interior mutability and protectors interact poorly.
@@ -163,10 +163,10 @@ impl<'tcx> NewPermission {
163
163
zero_size : bool ,
164
164
) -> Option < Self > {
165
165
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 ( |( ) | {
167
167
// Regular `Unpin` box, give it `noalias` but only a weak protector
168
168
// 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 ) ;
170
170
let protected = kind == RetagKind :: FnEntry ;
171
171
let initial_state = Permission :: new_reserved ( ty_is_freeze, protected) ;
172
172
Self {
@@ -520,7 +520,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
520
520
// Note: if we were to inline `new_reserved` below we would find out that
521
521
// `ty_is_freeze` is eventually unused because it appears in a `ty_is_freeze || true`.
522
522
// 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 ) ;
524
524
// Retag it. With protection! That is the entire point.
525
525
let new_perm = NewPermission {
526
526
initial_state : Permission :: new_reserved ( ty_is_freeze, /* protected */ true ) ,
0 commit comments