File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 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>(
7474 let cv = fx. monomorphize ( constant. const_ ) ;
7575 // This cannot fail because we checked all required_consts in advance.
7676 let val = cv
77- . eval ( fx. tcx , ty:: ParamEnv :: reveal_all ( ) , Some ( constant. span ) )
77+ . eval ( fx. tcx , ty:: ParamEnv :: reveal_all ( ) , constant. span )
7878 . expect ( "erroneous constant missed by mono item collection" ) ;
7979 ( val, cv. ty ( ) )
8080}
Original file line number Diff line number Diff line change @@ -728,8 +728,10 @@ fn codegen_regular_intrinsic_call<'tcx>(
728728 | sym:: variant_count => {
729729 intrinsic_args ! ( fx, args => ( ) ; intrinsic) ;
730730
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 ( ) ;
733735 let val = crate :: constant:: codegen_const_value ( fx, const_val, ret. layout ( ) . ty ) ;
734736 ret. write_cvalue ( fx, val) ;
735737 }
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
131131
132132 let idx = generic_args[ 2 ]
133133 . expect_const ( )
134- . eval ( fx. tcx , ty:: ParamEnv :: reveal_all ( ) , Some ( span) )
134+ . eval ( fx. tcx , ty:: ParamEnv :: reveal_all ( ) , span)
135135 . unwrap ( )
136136 . unwrap_branch ( ) ;
137137
You can’t perform that action at this time.
0 commit comments