@@ -21,7 +21,7 @@ use stable_mir::abi::Layout;
21
21
use stable_mir:: compiler_interface:: SmirInterface ;
22
22
use stable_mir:: ty:: IndexedVal ;
23
23
24
- use crate :: rustc_smir:: context:: Context ;
24
+ use crate :: rustc_smir:: context:: SmirCtxt ;
25
25
use crate :: rustc_smir:: { Stable , Tables } ;
26
26
use crate :: stable_mir;
27
27
@@ -197,7 +197,7 @@ pub fn crate_num(item: &stable_mir::Crate) -> CrateNum {
197
197
// datastructures and stable MIR datastructures
198
198
scoped_thread_local ! ( static TLV : Cell <* const ( ) >) ;
199
199
200
- pub ( crate ) fn init < ' tcx , F , T > ( cx : & Context < ' tcx > , f : F ) -> T
200
+ pub ( crate ) fn init < ' tcx , F , T > ( cx : & SmirCtxt < ' tcx > , f : F ) -> T
201
201
where
202
202
F : FnOnce ( ) -> T ,
203
203
{
@@ -213,7 +213,7 @@ pub(crate) fn with_tables<R>(f: impl for<'tcx> FnOnce(&mut Tables<'tcx>) -> R) -
213
213
TLV . with ( |tlv| {
214
214
let ptr = tlv. get ( ) ;
215
215
assert ! ( !ptr. is_null( ) ) ;
216
- let context = ptr as * const Context < ' _ > ;
216
+ let context = ptr as * const SmirCtxt < ' _ > ;
217
217
let mut tables = unsafe { ( * context) . 0 . borrow_mut ( ) } ;
218
218
f ( & mut * tables)
219
219
} )
@@ -223,7 +223,7 @@ pub fn run<F, T>(tcx: TyCtxt<'_>, f: F) -> Result<T, Error>
223
223
where
224
224
F : FnOnce ( ) -> T ,
225
225
{
226
- let tables = Context ( RefCell :: new ( Tables {
226
+ let tables = SmirCtxt ( RefCell :: new ( Tables {
227
227
tcx,
228
228
def_ids : IndexMap :: default ( ) ,
229
229
alloc_ids : IndexMap :: default ( ) ,
0 commit comments