about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/ui/allow_attributes.fixed7
-rw-r--r--tests/ui/allow_attributes.rs7
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/allow_attributes.fixed b/tests/ui/allow_attributes.fixed
index 49ee3ee17c7..058dbb77a32 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<u8> {
+    let allow = None;
+    allow?;
+    Some(42)
+}
diff --git a/tests/ui/allow_attributes.rs b/tests/ui/allow_attributes.rs
index 854acf8348d..6d94ce50e4c 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<u8> {
+    let allow = None;
+    allow?;
+    Some(42)
+}