File tree 3 files changed +8
-4
lines changed
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;
11
11
use rustc_middle:: mir:: InlineAsmMacro ;
12
12
use rustc_middle:: ty:: TypeVisitableExt ;
13
13
use rustc_middle:: ty:: adjustment:: PointerCoercion ;
14
- use rustc_middle:: ty:: layout:: FnAbiOf ;
14
+ use rustc_middle:: ty:: layout:: { FnAbiOf , HasTypingEnv } ;
15
15
use rustc_middle:: ty:: print:: with_no_trimmed_paths;
16
16
17
17
use crate :: constant:: ConstantCx ;
@@ -841,7 +841,7 @@ fn codegen_stmt<'tcx>(
841
841
lval. write_cvalue ( fx, CValue :: by_val ( operand, box_layout) ) ;
842
842
}
843
843
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 ( ) ) ) ;
845
845
let layout = fx. layout_of ( fx. monomorphize ( ty) ) ;
846
846
let val = match null_op {
847
847
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>(
103
103
104
104
/// Is a pointer to this type a wide ptr?
105
105
pub ( 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 ( ) ) {
107
107
return false ;
108
108
}
109
109
Original file line number Diff line number Diff line change @@ -744,7 +744,11 @@ fn codegen_regular_intrinsic_call<'tcx>(
744
744
745
745
let const_val = fx
746
746
. 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
+ )
748
752
. unwrap ( ) ;
749
753
let val = crate :: constant:: codegen_const_value ( fx, const_val, ret. layout ( ) . ty ) ;
750
754
ret. write_cvalue ( fx, val) ;
You can’t perform that action at this time.
0 commit comments