Skip to content

Commit

Permalink
Rollup merge of rust-lang#133374 - RalfJung:abi_unsupported_vector_ty…
Browse files Browse the repository at this point in the history
…pes, r=jieyouxu

show abi_unsupported_vector_types lint in future breakage reports

The lint is now riding the train to 1.84. Given that crater found no case of this lint triggering at all, IMO it's fine to make it "report in deps" already for 1.85.

Part of rust-lang#116558.
  • Loading branch information
jieyouxu authored Nov 23, 2024
2 parents 5ed890c + d730319 commit 6b23b1d
Show file tree
Hide file tree
Showing 7 changed files with 624 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5173,7 +5173,7 @@ declare_lint! {
Warn,
"this function call or definition uses a vector type which is not enabled",
@future_incompatible = FutureIncompatibleInfo {
reason: FutureIncompatibilityReason::FutureReleaseErrorDontReportInDeps,
reason: FutureIncompatibilityReason::FutureReleaseErrorReportInDeps,
reference: "issue #116558 <https://github.com/rust-lang/rust/issues/116558>",
};
}
11 changes: 11 additions & 0 deletions tests/ui/simd-abi-checks-empty-list.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,14 @@ LL | pub extern "C" fn pass_by_vec(_: SimdVec) {}

warning: 1 warning emitted

Future incompatibility report: Future breakage diagnostic:
warning: this function definition uses a SIMD vector type that is not currently supported with the chosen ABI
--> $DIR/simd-abi-checks-empty-list.rs:17:1
|
LL | pub extern "C" fn pass_by_vec(_: SimdVec) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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>
= note: `#[warn(abi_unsupported_vector_types)]` on by default

164 changes: 164 additions & 0 deletions tests/ui/simd-abi-checks-s390x.z10.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,167 @@ LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>)

error: aborting due to 10 previous errors

Future incompatibility report: Future breakage diagnostic:
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:46:1
|
LL | extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Future breakage diagnostic:
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:52:1
|
LL | extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Future breakage diagnostic:
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:99:1
|
LL | / extern "C" fn vector_transparent_wrapper_ret_small(
LL | | x: &TransparentWrapper<i8x8>,
LL | | ) -> TransparentWrapper<i8x8> {
| |_____________________________^ 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=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Future breakage diagnostic:
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:107:1
|
LL | / extern "C" fn vector_transparent_wrapper_ret(
LL | | x: &TransparentWrapper<i8x16>,
LL | | ) -> TransparentWrapper<i8x16> {
| |______________________________^ 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=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Future breakage diagnostic:
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:123:1
|
LL | extern "C" fn vector_arg_small(x: i8x8) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Future breakage diagnostic:
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:129:1
|
LL | extern "C" fn vector_arg(x: i8x16) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Future breakage diagnostic:
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:141:1
|
LL | extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Future breakage diagnostic:
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:147:1
|
LL | extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Future breakage diagnostic:
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:159:1
|
LL | extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8x8>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Future breakage diagnostic:
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:165:1
|
LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

164 changes: 164 additions & 0 deletions tests/ui/simd-abi-checks-s390x.z13_no_vector.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,167 @@ LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>)

error: aborting due to 10 previous errors

Future incompatibility report: Future breakage diagnostic:
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:46:1
|
LL | extern "C" fn vector_ret_small(x: &i8x8) -> i8x8 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Future breakage diagnostic:
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:52:1
|
LL | extern "C" fn vector_ret(x: &i8x16) -> i8x16 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Future breakage diagnostic:
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:99:1
|
LL | / extern "C" fn vector_transparent_wrapper_ret_small(
LL | | x: &TransparentWrapper<i8x8>,
LL | | ) -> TransparentWrapper<i8x8> {
| |_____________________________^ 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=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Future breakage diagnostic:
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:107:1
|
LL | / extern "C" fn vector_transparent_wrapper_ret(
LL | | x: &TransparentWrapper<i8x16>,
LL | | ) -> TransparentWrapper<i8x16> {
| |______________________________^ 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=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Future breakage diagnostic:
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:123:1
|
LL | extern "C" fn vector_arg_small(x: i8x8) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Future breakage diagnostic:
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:129:1
|
LL | extern "C" fn vector_arg(x: i8x16) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Future breakage diagnostic:
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:141:1
|
LL | extern "C" fn vector_wrapper_arg_small(x: Wrapper<i8x8>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Future breakage diagnostic:
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:147:1
|
LL | extern "C" fn vector_wrapper_arg(x: Wrapper<i8x16>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Future breakage diagnostic:
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:159:1
|
LL | extern "C" fn vector_transparent_wrapper_arg_small(x: TransparentWrapper<i8x8>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Future breakage diagnostic:
error: this function definition uses a SIMD vector type that (with the chosen ABI) requires the `vector` target feature, which is not enabled
--> $DIR/simd-abi-checks-s390x.rs:165:1
|
LL | extern "C" fn vector_transparent_wrapper_arg(x: TransparentWrapper<i8x16>) -> i64 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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=+vector`) or locally (`#[target_feature(enable="vector")]`)
note: the lint level is defined here
--> $DIR/simd-abi-checks-s390x.rs:15:9
|
LL | #![deny(abi_unsupported_vector_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Loading

0 comments on commit 6b23b1d

Please sign in to comment.