File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -121,12 +121,10 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
121121 let idx_const = if let Some ( idx_const) = crate :: constant:: mir_operand_get_const_val( fx, idx) {
122122 idx_const
123123 } else {
124- fx. tcx. sess. span_warn (
125- fx . mir . span,
126- "`#[rustc_arg_required_const(..)] ` is not yet supported. Calling this function will panic. " ,
124+ fx. tcx. sess. span_fatal (
125+ span,
126+ "Index argument for `simd_insert ` is not a constant " ,
127127 ) ;
128- crate :: trap:: trap_unimplemented( fx, "`#[rustc_arg_required_const(..)]` is not yet supported." ) ;
129- return ;
130128 } ;
131129
132130 let idx = idx_const. val. try_to_bits( Size :: from_bytes( 4 /* u32*/ ) ) . expect( & format!( "kind not scalar: {:?}" , idx_const) ) ;
@@ -145,13 +143,10 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
145143 let idx_const = if let Some ( idx_const) = crate :: constant:: mir_operand_get_const_val( fx, idx) {
146144 idx_const
147145 } else {
148- fx. tcx. sess. span_warn (
149- fx . mir . span,
150- "`#[rustc_arg_required_const(..)] ` is not yet supported. Calling this function will panic. " ,
146+ fx. tcx. sess. span_fatal (
147+ span,
148+ "Index argument for `simd_extract ` is not a constant " ,
151149 ) ;
152- let val = crate :: trap:: trap_unimplemented_ret_value( fx, ret. layout( ) , "`#[rustc_arg_required_const(..)]` is not yet supported." ) ;
153- ret. write_cvalue( fx, val) ;
154- return ;
155150 } ;
156151
157152 let idx = idx_const. val. try_to_bits( Size :: from_bytes( 4 /* u32*/ ) ) . expect( & format!( "kind not scalar: {:?}" , idx_const) ) ;
You can’t perform that action at this time.
0 commit comments