I tried this code:
#![feature(arm_target_feature)]
#[target_feature(enable = "neon")]
unsafe fn foo() {}
This always compiles, but in armv7 targets that have -neon target-feature, running rustdoc on it produces the error
error: target feature `neon` cannot be toggled with `#[target_feature]`: unsound on hard-float targets because it changes float ABI
--> bug.rs:3:18
|
5 | #[target_feature(enable = "neon")]
|
even if the target has +soft-float (e.g armv7-unknown-linux-gnueabi).
rustc --version --verbose:
rustc 1.85.0-nightly (9e136a30a 2024-12-19)
binary: rustc
commit-hash: 9e136a30a965bf4e63f03095c57df7257bf96fd6
commit-date: 2024-12-19
host: x86_64-unknown-linux-gnu
release: 1.85.0-nightly
LLVM version: 19.1.6
Related: #133417
I tried this code:
This always compiles, but in
armv7targets that have-neontarget-feature, runningrustdocon it produces the erroreven if the target has
+soft-float(e.garmv7-unknown-linux-gnueabi).rustc --version --verbose:Related: #133417