]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/allow_attributes_without_reason.rs
Rollup merge of #102072 - scottmcm:ptr-alignment-type, r=thomcc
[rust.git] / src / tools / clippy / tests / ui / allow_attributes_without_reason.rs
1 #![feature(lint_reasons)]
2 #![deny(clippy::allow_attributes_without_reason)]
3
4 // These should trigger the lint
5 #[allow(dead_code)]
6 #[allow(dead_code, deprecated)]
7 // These should be fine
8 #[allow(dead_code, reason = "This should be allowed")]
9 #[warn(dyn_drop, reason = "Warnings can also have reasons")]
10 #[warn(deref_nullptr)]
11 #[deny(deref_nullptr)]
12 #[forbid(deref_nullptr)]
13
14 fn main() {}