]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/rfc-2383-lint-reason/lint-attribute-only-with-reason.rs
Auto merge of #106884 - clubby789:fieldless-enum-debug, r=michaelwoerister
[rust.git] / tests / ui / lint / rfc-2383-lint-reason / lint-attribute-only-with-reason.rs
1 #![feature(lint_reasons)]
2
3 #![deny(unused_attributes)]
4
5 #[allow(reason = "I want to allow something")]//~ ERROR unused attribute
6 #[expect(reason = "I don't know what I'm waiting for")]//~ ERROR unused attribute
7 #[warn(reason = "This should be warn by default")]//~ ERROR unused attribute
8 #[deny(reason = "All listed lints are denied")]//~ ERROR unused attribute
9 #[forbid(reason = "Just some reason")]//~ ERROR unused attribute
10
11 #[allow(clippy::box_collection, reason = "This is still valid")]
12 #[warn(dead_code, reason = "This is also reasonable")]
13
14 fn main() {}