#143924 extended the ABI checks that we run during monomorphization to also cover scalable vectors. However, those ABI checks were only meant to catch "C" ABI problems, and they are therefore partially disabled for "Rust" ABI calls. Specifically, while we are checking "Rust" ABI definitions, we are not checking "Rust" ABI calls:
|
if extern_abi.is_rustic_abi() || extern_abi == ExternAbi::Unadjusted { |
|
// We directly handle the soundness of Rust ABIs -- so let's skip the majority of |
|
// call sites to avoid a perf regression. |
|
// We disable all checks for the unadjusted ABI to allow linking to arbitrary LLVM |
|
// intrinsics |
|
return; |
|
} |
One can therefore compile this code without having the scalable vector target feature enabled:
fn foo(f: fn() -> svint32_t) {
let _x = f();
}
At least, that's what I would expect; I don't have the setup to test this.
Cc @davidtwco @workingjubilee
Tracking issue: #145052
#143924 extended the ABI checks that we run during monomorphization to also cover scalable vectors. However, those ABI checks were only meant to catch "C" ABI problems, and they are therefore partially disabled for "Rust" ABI calls. Specifically, while we are checking "Rust" ABI definitions, we are not checking "Rust" ABI calls:
rust/compiler/rustc_monomorphize/src/mono_checks/abi_check.rs
Lines 199 to 205 in 973c3f6
One can therefore compile this code without having the scalable vector target feature enabled:
At least, that's what I would expect; I don't have the setup to test this.
Cc @davidtwco @workingjubilee
Tracking issue: #145052