Skip to content
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

abi_unsupported_vector_types lint is optimization-dependent #132129

Open
RalfJung opened this issue Oct 25, 2024 · 0 comments
Open

abi_unsupported_vector_types lint is optimization-dependent #132129

RalfJung opened this issue Oct 25, 2024 · 0 comments
Labels
A-ABI Area: Concerning the application binary interface (ABI) A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-discussion Category: Discussion or questions that doesn't represent real issues. E-needs-design This issue needs exploration and design to see how and if we can fix/implement it L-abi_unsupported_vector_types Lint: abi_unsupported_vector_types T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue.

Comments

@RalfJung
Copy link
Member

The lint guarding against #116558 is intended to eventually become a hard error to fix this ABI issue. However, right now the lint is optimization-dependent: it runs during monomorphization to be able to figure out the actual argument types that will be passed at all call sites, and reject them if they need a missing target feature. If a call gets optimized away (e.g. in dead code), the lint will not fire.

I don't know any good way to prevent this, since we need the monomorphization-time information to check whether any of the arguments is a too-large SIMD vector. So this issue mostly serves to let @rust-lang/lang know that this is a thing, and as a place to track any ideas we might have about fixing this, or concerns about making this into an optimization-dependent hard error.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 25, 2024
@jieyouxu jieyouxu added A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. T-lang Relevant to the language team, which will review and decide on the PR/issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-discussion Category: Discussion or questions that doesn't represent real issues. A-ABI Area: Concerning the application binary interface (ABI) E-needs-design This issue needs exploration and design to see how and if we can fix/implement it L-abi_unsupported_vector_types Lint: abi_unsupported_vector_types and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ABI Area: Concerning the application binary interface (ABI) A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-discussion Category: Discussion or questions that doesn't represent real issues. E-needs-design This issue needs exploration and design to see how and if we can fix/implement it L-abi_unsupported_vector_types Lint: abi_unsupported_vector_types T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants