Skip to content

Commit cc2f447

Browse files
committed
Check that #[deny(allow_attributes)] do not issue spurious messages
1 parent 43e3384 commit cc2f447

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

tests/ui/allow_attributes.fixed

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,10 @@ fn msrv_1_80() {
5858
#[allow(unused)]
5959
let x = 1;
6060
}
61+
62+
#[deny(clippy::allow_attributes)]
63+
fn deny_allow_attributes() -> Option<u8> {
64+
let allow = None;
65+
allow?;
66+
Some(42)
67+
}

tests/ui/allow_attributes.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,10 @@ fn msrv_1_80() {
5858
#[allow(unused)]
5959
let x = 1;
6060
}
61+
62+
#[deny(clippy::allow_attributes)]
63+
fn deny_allow_attributes() -> Option<u8> {
64+
let allow = None;
65+
allow?;
66+
Some(42)
67+
}

0 commit comments

Comments
 (0)