Skip to content

make abi_unsupported_vector_types a hard error #139309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Apr 3, 2025

Fixes #116558 by completing the transition; see that issue for context. The lint was introduced with Rust 1.84 and this has been shown in cargo's future breakage reports since Rust 1.85, released 6 weeks ago, and so far we got 0 complaints by users. There's not even a backlink on the tracking issue. We did a crater run when the lint was originally added and found no breakage. So I don't think we need another crater run now, but I can do one if the team prefers that.

#131800 is done, so for most current targets (in particular, all tier 1 and tier 2 targets) we have the information to implement this check (modulo the targets where we don't properly support SIMD vectors yet, see the sub-issues of #116558). If a new target gets added in the future, it will default to reject all SIMD vector types until proper information is added, which is the default we want.

This will need approval by for @rust-lang/lang. Cc @workingjubilee @veluca93

try-job: test-various
try-job: armhf-gnu

@rustbot
Copy link
Collaborator

rustbot commented Apr 3, 2025

r? @fee1-dead

rustbot has assigned @fee1-dead.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 3, 2025
@RalfJung RalfJung added I-lang-nominated Nominated for discussion during a lang team meeting. I-lang-easy-decision Issue: The decision needed by the team is conjectured to be easy; this does not imply nomination labels Apr 3, 2025
@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the abi_unsupported_vector_types branch from f4e41c2 to 607bd91 Compare April 3, 2025 10:30
@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the abi_unsupported_vector_types branch from 607bd91 to 39f82c8 Compare April 3, 2025 11:31
@@ -3,7 +3,7 @@
// x86 only.

//@ add-core-stubs
//@ compile-flags: --target i686-unknown-linux-gnu -Cno-prepopulate-passes -Copt-level=3
//@ compile-flags: --target i686-unknown-linux-gnu -Cno-prepopulate-passes -Copt-level=3 -Ctarget-feature=+avx
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@azhogin this test was using SIMD vector types without the appropriate target feature... I hope adding the target feature preserves the meaning of the test.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does.

@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the abi_unsupported_vector_types branch from 39f82c8 to d817e10 Compare April 3, 2025 12:41
@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the abi_unsupported_vector_types branch from d817e10 to 00743be Compare April 3, 2025 13:45
@rustbot
Copy link
Collaborator

rustbot commented Apr 3, 2025

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the abi_unsupported_vector_types branch from 00743be to 764fe74 Compare April 3, 2025 14:51
@rustbot rustbot added the A-run-make Area: port run-make Makefiles to rmake.rs label Apr 3, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 3, 2025

This PR modifies run-make tests.

cc @jieyouxu

@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the abi_unsupported_vector_types branch from 764fe74 to f6eb25c Compare April 3, 2025 17:04
@@ -56,7 +56,7 @@ fn main() {
.target(&target)
.emit("llvm-ir,asm")
.input("simd.rs")
.arg("-Ctarget-feature=-soft-float,+neon,+sse")
.arg("-Ctarget-feature=-soft-float,+neon,+sse2,+msa")
.arg(&format!("-Cextra-filename=-{target}"))
.run();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test will become a complete nightmare to maintain when we start to properly enforce some basic consistency of target features.

@ehuss
Copy link
Contributor

ehuss commented Apr 3, 2025

@RalfJung Do you think we can get this documented in the reference? Like maybe somewhere in the target_feature documentation or probably it makes more sense to be a part of the abi chapter with the abi chapter rework? Although I'm a little confused since Connor removed the SIMD section and I'm not sure why.

My uncertainty is emphasized because we currently don't really document SIMD, and I don't know how we plan to do that.

@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the abi_unsupported_vector_types branch from f6eb25c to 5bbf200 Compare April 4, 2025 06:01
@RalfJung
Copy link
Member Author

RalfJung commented Apr 4, 2025

@RalfJung Do you think we can get this documented in the reference? Like maybe somewhere in the target_feature documentation or probably it makes more sense to be a part of the abi chapter with the abi chapter rework? Although I'm a little confused since Connor removed the SIMD section and I'm not sure why.

My uncertainty is emphasized because we currently don't really document SIMD, and I don't know how we plan to do that.

Seems like this should be part of rust-lang/reference#1545 so I'd rather not add a separate PR now, that would just be a huge conflict.

@bors
Copy link
Collaborator

bors commented Apr 9, 2025

☔ The latest upstream changes (presumably #139555) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 20, 2025
@jieyouxu jieyouxu removed the S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. label Apr 21, 2025
@RalfJung
Copy link
Member Author

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 22, 2025
…s, r=<try>

make abi_unsupported_vector_types a hard error

Fixes rust-lang#116558 by completing the transition; see that issue for context. The lint was introduced with Rust 1.84 and this has been shown in cargo's future breakage reports since Rust 1.85, released 6 weeks ago, and so far we got 0 complaints by users. There's not even a backlink on the tracking issue. We did a [crater run](rust-lang#127731 (comment)) when the lint was originally added and found no breakage. So I don't think we need another crater run now, but I can do one if the team prefers that.

rust-lang#131800 is done, so for most current targets (in particular, all tier 1 and tier 2 targets) we have the information to implement this check (modulo the targets where we don't properly support SIMD vectors yet, see the sub-issues of rust-lang#116558). If a new target gets added in the future, it will default to reject all SIMD vector types until proper information is added, which is the default we want.

This will need approval by for `@rust-lang/lang.` Cc `@workingjubilee` `@veluca93`

try-job: test-various
@bors
Copy link
Collaborator

bors commented Apr 22, 2025

⌛ Trying commit 8b62073 with merge 48459fb...

@bors
Copy link
Collaborator

bors commented Apr 22, 2025

☀️ Try build successful - checks-actions
Build commit: 48459fb (48459fb6792acf4cbf16ee54b58073c5beb06746)

@RalfJung
Copy link
Member Author

RalfJung commented Apr 22, 2025 via email

@bors
Copy link
Collaborator

bors commented Apr 22, 2025

📌 Commit 8b62073 has been approved by fee1-dead,traviscross

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 22, 2025
ChrisDenton added a commit to ChrisDenton/rust that referenced this pull request Apr 22, 2025
…pes, r=fee1-dead,traviscross

make abi_unsupported_vector_types a hard error

Fixes rust-lang#116558 by completing the transition; see that issue for context. The lint was introduced with Rust 1.84 and this has been shown in cargo's future breakage reports since Rust 1.85, released 6 weeks ago, and so far we got 0 complaints by users. There's not even a backlink on the tracking issue. We did a [crater run](rust-lang#127731 (comment)) when the lint was originally added and found no breakage. So I don't think we need another crater run now, but I can do one if the team prefers that.

rust-lang#131800 is done, so for most current targets (in particular, all tier 1 and tier 2 targets) we have the information to implement this check (modulo the targets where we don't properly support SIMD vectors yet, see the sub-issues of rust-lang#116558). If a new target gets added in the future, it will default to reject all SIMD vector types until proper information is added, which is the default we want.

This will need approval by for `@rust-lang/lang.` Cc `@workingjubilee` `@veluca93`

try-job: test-various
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 22, 2025
…enton

Rollup of 8 pull requests

Successful merges:

 - rust-lang#139309 (make abi_unsupported_vector_types a hard error)
 - rust-lang#139617 (Use posix_spawn on cygwin)
 - rust-lang#140072 (handle function alignment in miri)
 - rust-lang#140104 (Fix auto diff failing on inherent impl blocks)
 - rust-lang#140124 (Update books)
 - rust-lang#140144 (Handle another negated literal in `eat_token_lit`.)
 - rust-lang#140146 (Update `compiler_builtins` to 0.1.156)
 - rust-lang#140149 (test_nan: ensure the NAN contant is quiet)

r? `@ghost`
`@rustbot` modify labels: rollup
@ChrisDenton
Copy link
Member

Failed in rollup: #140161 (comment)

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 22, 2025
@RalfJung
Copy link
Member Author

@bors rollup=never

@RalfJung RalfJung force-pushed the abi_unsupported_vector_types branch from 8b62073 to 5875605 Compare April 22, 2025 15:32
@RalfJung
Copy link
Member Author

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 22, 2025
…s, r=<try>

make abi_unsupported_vector_types a hard error

Fixes rust-lang#116558 by completing the transition; see that issue for context. The lint was introduced with Rust 1.84 and this has been shown in cargo's future breakage reports since Rust 1.85, released 6 weeks ago, and so far we got 0 complaints by users. There's not even a backlink on the tracking issue. We did a [crater run](rust-lang#127731 (comment)) when the lint was originally added and found no breakage. So I don't think we need another crater run now, but I can do one if the team prefers that.

rust-lang#131800 is done, so for most current targets (in particular, all tier 1 and tier 2 targets) we have the information to implement this check (modulo the targets where we don't properly support SIMD vectors yet, see the sub-issues of rust-lang#116558). If a new target gets added in the future, it will default to reject all SIMD vector types until proper information is added, which is the default we want.

This will need approval by for `@rust-lang/lang.` Cc `@workingjubilee` `@veluca93`

try-job: test-various
try-job: armhf-gnu
@bors
Copy link
Collaborator

bors commented Apr 22, 2025

⌛ Trying commit 5875605 with merge 40d505b1cc023e2148c0204d4e9af6c4a34dd1d1...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Apr 22, 2025

💔 Test failed - checks-actions

@RalfJung RalfJung force-pushed the abi_unsupported_vector_types branch from 5875605 to 64d0bb2 Compare April 23, 2025 06:35
@RalfJung
Copy link
Member Author

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 23, 2025
…s, r=<try>

make abi_unsupported_vector_types a hard error

Fixes rust-lang#116558 by completing the transition; see that issue for context. The lint was introduced with Rust 1.84 and this has been shown in cargo's future breakage reports since Rust 1.85, released 6 weeks ago, and so far we got 0 complaints by users. There's not even a backlink on the tracking issue. We did a [crater run](rust-lang#127731 (comment)) when the lint was originally added and found no breakage. So I don't think we need another crater run now, but I can do one if the team prefers that.

rust-lang#131800 is done, so for most current targets (in particular, all tier 1 and tier 2 targets) we have the information to implement this check (modulo the targets where we don't properly support SIMD vectors yet, see the sub-issues of rust-lang#116558). If a new target gets added in the future, it will default to reject all SIMD vector types until proper information is added, which is the default we want.

This will need approval by for `@rust-lang/lang.` Cc `@workingjubilee` `@veluca93`

try-job: test-various
try-job: armhf-gnu
@bors
Copy link
Collaborator

bors commented Apr 23, 2025

⌛ Trying commit 64d0bb2 with merge 38a9dffa5728c708611806992f4b44be159706a8...

@bors
Copy link
Collaborator

bors commented Apr 23, 2025

☀️ Try build successful - checks-actions
Build commit: 38a9dff (38a9dffa5728c708611806992f4b44be159706a8)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. I-lang-easy-decision Issue: The decision needed by the team is conjectured to be easy; this does not imply nomination S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-lang Relevant to the language team, which will review and decide on the PR/issue. to-announce Announce this issue on triage meeting
Projects
None yet