@@ -14,7 +14,7 @@ use std::ptr;
14
14
15
15
use rustc_ast:: ast:: Mutability ;
16
16
use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
17
- use rustc_middle:: ty:: { self , query :: TyCtxtAt , Instance , ParamEnv } ;
17
+ use rustc_middle:: ty:: { self , TyCtxt , Instance , ParamEnv } ;
18
18
use rustc_target:: abi:: { Align , HasDataLayout , Size , TargetDataLayout } ;
19
19
20
20
use super :: {
@@ -115,7 +115,7 @@ pub struct Memory<'mir, 'tcx, M: Machine<'mir, 'tcx>> {
115
115
pub extra : M :: MemoryExtra ,
116
116
117
117
/// Lets us implement `HasDataLayout`, which is awfully convenient.
118
- pub tcx : TyCtxtAt < ' tcx > ,
118
+ pub tcx : TyCtxt < ' tcx > ,
119
119
}
120
120
121
121
impl < ' mir , ' tcx , M : Machine < ' mir , ' tcx > > HasDataLayout for Memory < ' mir , ' tcx , M > {
@@ -126,7 +126,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> HasDataLayout for Memory<'mir, 'tcx, M>
126
126
}
127
127
128
128
impl < ' mir , ' tcx , M : Machine < ' mir , ' tcx > > Memory < ' mir , ' tcx , M > {
129
- pub fn new ( tcx : TyCtxtAt < ' tcx > , extra : M :: MemoryExtra ) -> Self {
129
+ pub fn new ( tcx : TyCtxt < ' tcx > , extra : M :: MemoryExtra ) -> Self {
130
130
Memory {
131
131
alloc_map : M :: MemoryMap :: default ( ) ,
132
132
extra_fn_ptr_map : FxHashMap :: default ( ) ,
@@ -425,7 +425,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> {
425
425
/// `M::tag_allocation`.
426
426
fn get_global_alloc (
427
427
memory_extra : & M :: MemoryExtra ,
428
- tcx : TyCtxtAt < ' tcx > ,
428
+ tcx : TyCtxt < ' tcx > ,
429
429
id : AllocId ,
430
430
is_write : bool ,
431
431
) -> InterpResult < ' tcx , Cow < ' tcx , Allocation < M :: PointerTag , M :: AllocExtra > > > {
@@ -455,7 +455,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> {
455
455
throw_unsup ! ( ReadForeignStatic ( def_id) )
456
456
}
457
457
trace ! ( "get_global_alloc: Need to compute {:?}" , def_id) ;
458
- let instance = Instance :: mono ( tcx. tcx , def_id) ;
458
+ let instance = Instance :: mono ( tcx, def_id) ;
459
459
let gid = GlobalId { instance, promoted : None } ;
460
460
// Use the raw query here to break validation cycles. Later uses of the static
461
461
// will call the full query anyway.
@@ -664,14 +664,14 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> {
664
664
pub fn dump_allocs ( & self , mut allocs : Vec < AllocId > ) {
665
665
// Cannot be a closure because it is generic in `Tag`, `Extra`.
666
666
fn write_allocation_track_relocs < ' tcx , Tag : Copy + fmt:: Debug , Extra > (
667
- tcx : TyCtxtAt < ' tcx > ,
667
+ tcx : TyCtxt < ' tcx > ,
668
668
allocs_to_print : & mut VecDeque < AllocId > ,
669
669
alloc : & Allocation < Tag , Extra > ,
670
670
) {
671
671
for & ( _, target_id) in alloc. relocations ( ) . values ( ) {
672
672
allocs_to_print. push_back ( target_id) ;
673
673
}
674
- pretty:: write_allocation ( tcx. tcx , alloc, & mut std:: io:: stderr ( ) ) . unwrap ( ) ;
674
+ pretty:: write_allocation ( tcx, alloc, & mut std:: io:: stderr ( ) ) . unwrap ( ) ;
675
675
}
676
676
677
677
allocs. sort ( ) ;
@@ -820,7 +820,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> {
820
820
return Ok ( ( ) ) ;
821
821
}
822
822
} ;
823
- let tcx = self . tcx . tcx ;
823
+ let tcx = self . tcx ;
824
824
self . get_raw_mut ( ptr. alloc_id ) ?. write_bytes ( & tcx, ptr, src)
825
825
}
826
826
@@ -846,7 +846,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> {
846
846
return Ok ( ( ) ) ;
847
847
}
848
848
} ;
849
- let tcx = self . tcx . tcx ;
849
+ let tcx = self . tcx ;
850
850
let allocation = self . get_raw_mut ( ptr. alloc_id ) ?;
851
851
852
852
for idx in 0 ..len {
@@ -888,7 +888,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> {
888
888
let relocations =
889
889
self . get_raw ( src. alloc_id ) ?. prepare_relocation_copy ( self , src, size, dest, length) ;
890
890
891
- let tcx = self . tcx . tcx ;
891
+ let tcx = self . tcx ;
892
892
893
893
// This checks relocation edges on the src.
894
894
let src_bytes =
0 commit comments