Skip to content

Commit

Permalink
Check that #[deny(allow_attributes)] do not issue spurious messages
Browse files Browse the repository at this point in the history
  • Loading branch information
samueltardieu committed Sep 12, 2024
1 parent e039e72 commit 99aaf36
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 99aaf36

Please sign in to comment.