-
Notifications
You must be signed in to change notification settings - Fork 13.3k
optimize
attribute can be applied to anything
#128488
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
C-bug
Category: This is a bug.
F-optimize_attribute
`#![feature(optimize_attribute)]`
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
I think #128458 should have fixed this |
It emits |
Is this issue still available to work on? |
9 tasks
@rustbot claim |
I'll be submitting a PR for this in case the RFC dictates errors in place of warnings, at least in this instance. |
Borgerr
added a commit
to Borgerr/rust
that referenced
this issue
Aug 10, 2024
…losures gives an error (rust-lang#128488)
Borgerr
added a commit
to Borgerr/rust
that referenced
this issue
Aug 11, 2024
…losures give s an error (rust-lang#128488)
Borgerr
added a commit
to Borgerr/rust
that referenced
this issue
Oct 17, 2024
…losures give s an error (rust-lang#128488)
Borgerr
added a commit
to Borgerr/rust
that referenced
this issue
Oct 20, 2024
Borgerr
added a commit
to Borgerr/rust
that referenced
this issue
Oct 20, 2024
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Oct 20, 2024
…ute, r=jieyouxu `optimize` attribute applied to things other than methods/functions/c… …losures gives an error (rust-lang#128488) Duplicate of rust-lang#128943, which I had accidentally closed when rebasing. cc. `@jieyouxu` `@compiler-errors` `@nikomatsakis` `@traviscross` `@pnkfelix.`
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Oct 21, 2024
Rollup merge of rust-lang#131814 - Borgerr:misapplied-optimize-attribute, r=jieyouxu `optimize` attribute applied to things other than methods/functions/c… …losures gives an error (rust-lang#128488) Duplicate of rust-lang#128943, which I had accidentally closed when rebasing. cc. `@jieyouxu` `@compiler-errors` `@nikomatsakis` `@traviscross` `@pnkfelix.`
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
C-bug
Category: This is a bug.
F-optimize_attribute
`#![feature(optimize_attribute)]`
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 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
The text was updated successfully, but these errors were encountered: