@@ -24,23 +24,23 @@ use rustc_span::def_id::{CrateNum, DefId, LOCAL_CRATE};
2424use rustc_span:: { FileNameDisplayPreference , Span , Symbol } ;
2525use rustc_target:: callconv:: FnAbi ;
2626
27- use super :: { SmirAllocRange , CompilerCtxt , SmirTy , SmirTypingEnv } ;
27+ use super :: { AllocRangeHelpers , CompilerCtxt , TyHelpers , TypingEnvHelpers } ;
2828use crate :: builder:: BodyBuilder ;
2929use crate :: { Bridge , SmirError , Tables , filter_def_ids} ;
3030
31- impl < ' tcx , B : Bridge > SmirTy < ' tcx > for CompilerCtxt < ' tcx , B > {
31+ impl < ' tcx , B : Bridge > TyHelpers < ' tcx > for CompilerCtxt < ' tcx , B > {
3232 fn new_foreign ( & self , def_id : DefId ) -> ty:: Ty < ' tcx > {
3333 ty:: Ty :: new_foreign ( self . tcx , def_id)
3434 }
3535}
3636
37- impl < ' tcx , B : Bridge > SmirTypingEnv < ' tcx > for CompilerCtxt < ' tcx , B > {
37+ impl < ' tcx , B : Bridge > TypingEnvHelpers < ' tcx > for CompilerCtxt < ' tcx , B > {
3838 fn fully_monomorphized ( & self ) -> ty:: TypingEnv < ' tcx > {
3939 ty:: TypingEnv :: fully_monomorphized ( )
4040 }
4141}
4242
43- impl < ' tcx , B : Bridge > SmirAllocRange < ' tcx > for CompilerCtxt < ' tcx , B > {
43+ impl < ' tcx , B : Bridge > AllocRangeHelpers < ' tcx > for CompilerCtxt < ' tcx , B > {
4444 fn alloc_range (
4545 & self ,
4646 offset : rustc_abi:: Size ,
@@ -426,7 +426,7 @@ impl<'tcx, B: Bridge> CompilerCtxt<'tcx, B> {
426426
427427 /// Evaluate constant as a target usize.
428428 pub fn eval_target_usize ( & self , cnst : MirConst < ' tcx > ) -> Result < u64 , B :: Error > {
429- use crate :: context:: SmirTypingEnv ;
429+ use crate :: context:: TypingEnvHelpers ;
430430 cnst. try_eval_target_usize ( self . tcx , self . fully_monomorphized ( ) )
431431 . ok_or_else ( || B :: Error :: new ( format ! ( "Const `{cnst:?}` cannot be encoded as u64" ) ) )
432432 }
0 commit comments