Skip to content

Commit b39323b

Browse files
committed
Auto merge of #13389 - samueltardieu:issue-13380, r=xFrednet
Check that #[deny(allow_attributes)] do not issue spurious messages Add a new test for #13380. This bug was caused by a bug in rustc which has been fixed in 6ee87ae. Close #13380 changelog: [`allow_attributes`]: fix spurious warning messages
2 parents 59bac6a + cc2f447 commit b39323b

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Diff for: tests/ui/allow_attributes.fixed

+7
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+
}

Diff for: tests/ui/allow_attributes.rs

+7
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)