You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
don't suggest turning crate-level attributes into outer style #127930
Compiling playground v0.0.1 (/playground)
error: an inner attribute is not permitted in this context
--> src/lib.rs:3:1
|
3 |#![feature(iter_array_chunks)]| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4 | fn bar() {}
| ----------- the inner attribute doesn't annotate this function | = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source fileshelp: to annotate the function, change the attribute from inner to outer style |3 - #![feature(iter_array_chunks)]3 + #[feature(iter_array_chunks)] |
Desired output
Compiling playground v0.0.1 (/playground)
error: an inner attribute is not permitted in this context
--> src/lib.rs:3:1
|
3 |#![feature(iter_array_chunks)]| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4 | fn bar() {}
| ----------- the inner attribute doesn't annotate this function | = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
We might be able to suggest moving it to the top of the module by default. And then only if it an attribute known to work as both inner and outer (allow/deny, cfg, etc) suggest removing the !.
Activity
tgross35 commentedon Jul 19, 2024
We might be able to suggest moving it to the top of the module by default. And then only if it an attribute known to work as both inner and outer (
allow/deny,cfg, etc) suggest removing the!.Rollup merge of rust-lang#128524 - chenyukang:yukang-fix-127930-inval…
Rollup merge of rust-lang#128524 - chenyukang:yukang-fix-127930-inval…
Rollup merge of rust-lang#128524 - chenyukang:yukang-fix-127930-inval…
Unrolled build for rust-lang#128524