mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
Rollup merge of #157023 - samueltardieu:push-mwykwuslpolq, r=nnethercote
`#[expect]` is an attribute valid for outer style
This commit is contained in:
@@ -3497,6 +3497,7 @@ pub fn is_valid_for_outer_style(&self) -> bool {
|
||||
|| self.path == sym::warn
|
||||
|| self.path == sym::allow
|
||||
|| self.path == sym::deny
|
||||
|| self.path == sym::expect
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,11 @@ LL | fn main() {}
|
||||
| ------------ 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
|
||||
help: to annotate the function, change the attribute from inner to outer style
|
||||
|
|
||||
LL - #![expect(unused)]
|
||||
LL + #[expect(unused)]
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
||||
Reference in New Issue
Block a user