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

instruction_set attribute can be applied to anything #128489

Open
oli-obk opened this issue Aug 1, 2024 · 1 comment · May be fixed by #129002
Open

instruction_set attribute can be applied to anything #128489

oli-obk opened this issue Aug 1, 2024 · 1 comment · May be fixed by #129002
Assignees
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Aug 1, 2024

I tried this code:

#[instruction_set(asdfasdf)]
type Foo = ();

I expected to see this happen: compilation failure because of attribute on an item where it makes no sense

Instead, this happened: compiled successfully

Meta

rustc --version --verbose:

1.80 stable

cc #74727

see #128444 for where to fix this issue, though it will be a breaking change if we hard error. That seems fine though, as the attribute is completely useless on these places.

@oli-obk oli-obk added the C-bug Category: This is a bug. label Aug 1, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 1, 2024
@fmease fmease added A-attributes Area: Attributes (`#[…]`, `#![…]`) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Aug 1, 2024
@chansuke
Copy link
Contributor

chansuke commented Aug 8, 2024

@rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants