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 6ee87ae594.

Close #13380

changelog: [`allow_attributes`]: fix spurious warning messages
This commit is contained in:
bors 2024-09-23 16:48:30 +00:00
commit b39323bf25
2 changed files with 14 additions and 0 deletions

View File

@ -58,3 +58,10 @@ fn msrv_1_80() {
#[allow(unused)]
let x = 1;
}
#[deny(clippy::allow_attributes)]
fn deny_allow_attributes() -> Option<u8> {
let allow = None;
allow?;
Some(42)
}

View File

@ -58,3 +58,10 @@ fn msrv_1_80() {
#[allow(unused)]
let x = 1;
}
#[deny(clippy::allow_attributes)]
fn deny_allow_attributes() -> Option<u8> {
let allow = None;
allow?;
Some(42)
}