Skip to content

Commit

Permalink
Auto merge of #13389 - samueltardieu:issue-13380, r=xFrednet
Browse files Browse the repository at this point in the history
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 rust-lang/rust@6ee87ae.

Close #13380

changelog: [`allow_attributes`]: fix spurious warning messages
  • Loading branch information
bors committed Sep 23, 2024
2 parents 59bac6a + cc2f447 commit b39323b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/ui/allow_attributes.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
7 changes: 7 additions & 0 deletions tests/ui/allow_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit b39323b

Please sign in to comment.