File tree 3 files changed +6
-4
lines changed 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ pub(crate) fn eval_mir_constant<'tcx>(
74
74
let cv = fx. monomorphize ( constant. const_ ) ;
75
75
// This cannot fail because we checked all required_consts in advance.
76
76
let val = cv
77
- . eval ( fx. tcx , ty:: ParamEnv :: reveal_all ( ) , Some ( constant. span ) )
77
+ . eval ( fx. tcx , ty:: ParamEnv :: reveal_all ( ) , constant. span )
78
78
. expect ( "erroneous constant missed by mono item collection" ) ;
79
79
( val, cv. ty ( ) )
80
80
}
Original file line number Diff line number Diff line change @@ -728,8 +728,10 @@ fn codegen_regular_intrinsic_call<'tcx>(
728
728
| sym:: variant_count => {
729
729
intrinsic_args ! ( fx, args => ( ) ; intrinsic) ;
730
730
731
- let const_val =
732
- fx. tcx . const_eval_instance ( ParamEnv :: reveal_all ( ) , instance, None ) . unwrap ( ) ;
731
+ let const_val = fx
732
+ . tcx
733
+ . const_eval_instance ( ParamEnv :: reveal_all ( ) , instance, source_info. span )
734
+ . unwrap ( ) ;
733
735
let val = crate :: constant:: codegen_const_value ( fx, const_val, ret. layout ( ) . ty ) ;
734
736
ret. write_cvalue ( fx, val) ;
735
737
}
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
131
131
132
132
let idx = generic_args[ 2 ]
133
133
. expect_const ( )
134
- . eval ( fx. tcx , ty:: ParamEnv :: reveal_all ( ) , Some ( span) )
134
+ . eval ( fx. tcx , ty:: ParamEnv :: reveal_all ( ) , span)
135
135
. unwrap ( )
136
136
. unwrap_branch ( ) ;
137
137
You can’t perform that action at this time.
0 commit comments