@@ -17,7 +17,7 @@ use rustc_middle::mir::{
1717 Location , Operand , Place , Rvalue , SourceInfo , SourceScope , SourceScopeData , Statement ,
1818 StatementKind , Terminator , TerminatorKind , UnOp , RETURN_PLACE ,
1919} ;
20- use rustc_middle:: ty:: layout:: { HasTyCtxt , LayoutError , TyAndLayout } ;
20+ use rustc_middle:: ty:: layout:: { LayoutError , TyAndLayout } ;
2121use rustc_middle:: ty:: subst:: { InternalSubsts , Subst } ;
2222use rustc_middle:: ty:: {
2323 self , ConstInt , ConstKind , Instance , ParamEnv , ScalarInt , Ty , TyCtxt , TypeFoldable ,
@@ -346,13 +346,20 @@ impl<'mir, 'tcx> HasDataLayout for ConstPropagator<'mir, 'tcx> {
346346 }
347347}
348348
349- impl < ' mir , ' tcx > HasTyCtxt < ' tcx > for ConstPropagator < ' mir , ' tcx > {
349+ impl < ' mir , ' tcx > ty :: layout :: HasTyCtxt < ' tcx > for ConstPropagator < ' mir , ' tcx > {
350350 #[ inline]
351351 fn tcx ( & self ) -> TyCtxt < ' tcx > {
352352 self . tcx
353353 }
354354}
355355
356+ impl < ' mir , ' tcx > ty:: layout:: HasParamEnv < ' tcx > for ConstPropagator < ' mir , ' tcx > {
357+ #[ inline]
358+ fn param_env ( & self ) -> ty:: ParamEnv < ' tcx > {
359+ self . param_env
360+ }
361+ }
362+
356363impl < ' mir , ' tcx > ConstPropagator < ' mir , ' tcx > {
357364 fn new (
358365 body : & Body < ' tcx > ,
0 commit comments