]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/unnecessary_safety_comment.rs
Merge commit '1480cea393d0cee195e59949eabdfbcf1230f7f9' into clippyup
[rust.git] / src / tools / clippy / tests / ui / unnecessary_safety_comment.rs
index 7fefea7051d698ce92aab8e5c9dc6b48242e2564..89fedb145f88bd2c75748559237c58477e0fe6a3 100644 (file)
@@ -48,4 +48,21 @@ fn unnecessary_on_stmt_and_expr() -> u32 {
     24
 }
 
+mod issue_10084 {
+    unsafe fn bar() -> i32 {
+        42
+    }
+
+    macro_rules! foo {
+        () => {
+            // SAFETY: This is necessary
+            unsafe { bar() }
+        };
+    }
+
+    fn main() {
+        foo!();
+    }
+}
+
 fn main() {}