diff --git a/tests/ui/allow_attributes.fixed b/tests/ui/allow_attributes.fixed index 49ee3ee17..058dbb77a 100644 --- a/tests/ui/allow_attributes.fixed +++ b/tests/ui/allow_attributes.fixed @@ -58,3 +58,10 @@ fn msrv_1_80() { #[allow(unused)] let x = 1; } + +#[deny(clippy::allow_attributes)] +fn deny_allow_attributes() -> Option { + let allow = None; + allow?; + Some(42) +} diff --git a/tests/ui/allow_attributes.rs b/tests/ui/allow_attributes.rs index 854acf834..6d94ce50e 100644 --- a/tests/ui/allow_attributes.rs +++ b/tests/ui/allow_attributes.rs @@ -58,3 +58,10 @@ fn msrv_1_80() { #[allow(unused)] let x = 1; } + +#[deny(clippy::allow_attributes)] +fn deny_allow_attributes() -> Option { + let allow = None; + allow?; + Some(42) +}