mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
5af56cac38
On some architectures, vector types may have a different ABI when relevant target features are enabled. As discussed in https://github.com/rust-lang/lang-team/issues/235, this turns out to very easily lead to unsound code. This commit makes it an error to declare or call functions using those vector types in a context in which the corresponding target features are disabled, if using an ABI for which the difference is relevant.
14 lines
728 B
Plaintext
14 lines
728 B
Plaintext
warning: ABI error: this function definition uses a vector type that requires the `sse` target feature, which is not enabled
|
|
--> $DIR/sse-abi-checks.rs:21:1
|
|
|
|
|
LL | pub unsafe extern "C" fn f(_: SseVector) {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
|
|
|
|
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
|
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
|
|
= help: consider enabling it globally (`-C target-feature=+sse`) or locally (`#[target_feature(enable="sse")]`)
|
|
= note: `#[warn(abi_unsupported_vector_types)]` on by default
|
|
|
|
warning: 1 warning emitted
|
|
|