This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
1111use rustc_middle:: mir:: InlineAsmMacro ;
1212use rustc_middle:: ty:: TypeVisitableExt ;
1313use rustc_middle:: ty:: adjustment:: PointerCoercion ;
14- use rustc_middle:: ty:: layout:: FnAbiOf ;
14+ use rustc_middle:: ty:: layout:: { FnAbiOf , HasTypingEnv } ;
1515use rustc_middle:: ty:: print:: with_no_trimmed_paths;
1616
1717use crate :: constant:: ConstantCx ;
@@ -841,7 +841,7 @@ fn codegen_stmt<'tcx>(
841841 lval. write_cvalue ( fx, CValue :: by_val ( operand, box_layout) ) ;
842842 }
843843 Rvalue :: NullaryOp ( ref null_op, ty) => {
844- assert ! ( lval. layout( ) . ty. is_sized( fx. tcx, ty :: ParamEnv :: reveal_all ( ) ) ) ;
844+ assert ! ( lval. layout( ) . ty. is_sized( fx. tcx, fx . typing_env ( ) ) ) ;
845845 let layout = fx. layout_of ( fx. monomorphize ( ty) ) ;
846846 let val = match null_op {
847847 NullOp :: SizeOf => layout. size . bytes ( ) ,
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ fn clif_pair_type_from_ty<'tcx>(
103103
104104/// Is a pointer to this type a wide ptr?
105105pub ( crate ) fn has_ptr_meta < ' tcx > ( tcx : TyCtxt < ' tcx > , ty : Ty < ' tcx > ) -> bool {
106- if ty. is_sized ( tcx, ty:: ParamEnv :: reveal_all ( ) ) {
106+ if ty. is_sized ( tcx, ty:: TypingEnv :: fully_monomorphized ( ) ) {
107107 return false ;
108108 }
109109
Original file line number Diff line number Diff line change @@ -744,7 +744,11 @@ fn codegen_regular_intrinsic_call<'tcx>(
744744
745745 let const_val = fx
746746 . tcx
747- . const_eval_instance ( ty:: ParamEnv :: reveal_all ( ) , instance, source_info. span )
747+ . const_eval_instance (
748+ ty:: TypingEnv :: fully_monomorphized ( ) ,
749+ instance,
750+ source_info. span ,
751+ )
748752 . unwrap ( ) ;
749753 let val = crate :: constant:: codegen_const_value ( fx, const_val, ret. layout ( ) . ty ) ;
750754 ret. write_cvalue ( fx, val) ;
You can’t perform that action at this time.
0 commit comments