-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
optimize attribute can be applied to anything #128488
Copy link
Copy link
Closed
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)C-bugCategory: This is a bug.Category: This is a bug.F-optimize_attribute`#![feature(optimize_attribute)]``#![feature(optimize_attribute)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)C-bugCategory: This is a bug.Category: This is a bug.F-optimize_attribute`#![feature(optimize_attribute)]``#![feature(optimize_attribute)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language team
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried this code:
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:cc #54882
see #128444 for where to fix this issue