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

#[target_feature] is allowed on main #108645

Closed
Tracked by #69098
LeSeulArtichaut opened this issue Mar 2, 2023 · 2 comments · Fixed by #108651
Closed
Tracked by #69098

#[target_feature] is allowed on main #108645

LeSeulArtichaut opened this issue Mar 2, 2023 · 2 comments · Fixed by #108651
Assignees
Labels
A-target-feature Area: Enabling/disabling target features like AVX, Neon, etc. C-bug Category: This is a bug. F-target_feature_11 target feature 1.1 RFC I-unsound Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness P-high High priority requires-nightly This issue requires a nightly compiler in some way. 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

@LeSeulArtichaut
Copy link
Contributor

#[target_feature(enable = "avx2")] // no error
fn main() {}

This is a consequence of #[target_feature] being allowed on safe functions with #![feature(target_feature_11)].

cc #69098
@rustbot label T-lang T-compiler C-bug I-unsound F-target_feature_11

@rustbot rustbot added C-bug Category: This is a bug. F-target_feature_11 target feature 1.1 RFC I-unsound Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness 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. I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Mar 2, 2023
@apiraino
Copy link
Contributor

apiraino commented Mar 2, 2023

WG-prioritization assigning priority (Zulip discussion).

@rustbot label -I-prioritize +P-critical

@rustbot rustbot added P-critical Critical priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Mar 2, 2023
compiler-errors added a commit to compiler-errors/rust that referenced this issue Mar 2, 2023
…ure-on-main, r=Nilstrieb

Forbid the use of `#[target_feature]` on `main`

Fixes rust-lang#108645.
bors added a commit to rust-lang-ci/rust that referenced this issue Mar 2, 2023
…iler-errors

Revert stabilization of `#![feature(target_feature_11)]`

This reverts rust-lang#99767 due to the presence of bugs rust-lang#108645 and rust-lang#108646.

cc `@joshtriplett`
cc tracking issue rust-lang#69098
r? `@ghost`
@workingjubilee workingjubilee added the requires-nightly This issue requires a nightly compiler in some way. label Mar 3, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 3, 2023
…ure-on-main, r=Nilstrieb

Forbid the use of `#[target_feature]` on `main`

Fixes rust-lang#108645.
@workingjubilee workingjubilee added the A-target-feature Area: Enabling/disabling target features like AVX, Neon, etc. label Mar 3, 2023
@joshtriplett joshtriplett added P-high High priority and removed P-critical Critical priority labels Mar 7, 2023
@joshtriplett
Copy link
Member

Dropping P-critical because this is no longer on a train to stable, since we reverted stabilization of target_feature_11. This should be considered a blocker for stabilizing target_feature_11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-target-feature Area: Enabling/disabling target features like AVX, Neon, etc. C-bug Category: This is a bug. F-target_feature_11 target feature 1.1 RFC I-unsound Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness P-high High priority requires-nightly This issue requires a nightly compiler in some way. 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

Successfully merging a pull request may close this issue.

5 participants