File tree 1 file changed +6
-11
lines changed
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>(
121
121
let idx_const = if let Some ( idx_const) = crate :: constant:: mir_operand_get_const_val( fx, idx) {
122
122
idx_const
123
123
} 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 " ,
127
127
) ;
128
- crate :: trap:: trap_unimplemented( fx, "`#[rustc_arg_required_const(..)]` is not yet supported." ) ;
129
- return ;
130
128
} ;
131
129
132
130
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>(
145
143
let idx_const = if let Some ( idx_const) = crate :: constant:: mir_operand_get_const_val( fx, idx) {
146
144
idx_const
147
145
} 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 " ,
151
149
) ;
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 ;
155
150
} ;
156
151
157
152
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