File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1255,7 +1255,17 @@ fn codegen_regular_intrinsic_call<'tcx>(
1255
1255
1256
1256
// Unimplemented intrinsics must have a fallback body. The fallback body is obtained
1257
1257
// by converting the `InstanceDef::Intrinsic` to an `InstanceDef::Item`.
1258
- _ => return Err ( Instance :: new ( instance. def_id ( ) , instance. args ) ) ,
1258
+ _ => {
1259
+ let intrinsic = fx. tcx . intrinsic ( instance. def_id ( ) ) . unwrap ( ) ;
1260
+ if intrinsic. must_be_overridden {
1261
+ span_bug ! (
1262
+ source_info. span,
1263
+ "intrinsic {} must be overridden by codegen_cranelift, but isn't" ,
1264
+ intrinsic. name,
1265
+ ) ;
1266
+ }
1267
+ return Err ( Instance :: new ( instance. def_id ( ) , instance. args ) ) ;
1268
+ }
1259
1269
}
1260
1270
1261
1271
let ret_block = fx. get_block ( destination. unwrap ( ) ) ;
You can’t perform that action at this time.
0 commit comments