about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui-toml/macro_metavars_in_unsafe/default/test.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui-toml/macro_metavars_in_unsafe/default/test.rs b/tests/ui-toml/macro_metavars_in_unsafe/default/test.rs
index 2465fe45645..d3d5b0c103e 100644
--- a/tests/ui-toml/macro_metavars_in_unsafe/default/test.rs
+++ b/tests/ui-toml/macro_metavars_in_unsafe/default/test.rs
@@ -251,6 +251,16 @@ pub mod issue13219 {
     }
 }
 
+#[macro_export]
+macro_rules! issue14488 {
+    ($e:expr) => {
+        #[expect(clippy::macro_metavars_in_unsafe)]
+        unsafe {
+            $e
+        }
+    };
+}
+
 fn main() {
     allow_works!(1);
     simple!(1);
@@ -271,4 +281,10 @@ fn main() {
     multiple_unsafe_blocks!(1, 1, 1);
     unsafe_from_root_ctxt!(unsafe { 1 });
     nested_macros!(1, 1);
+
+    // These two invocations lead to two expanded unsafe blocks, each with an `#[expect]` on it.
+    // Only of them gets a warning, which used to result in an unfulfilled expectation for the other
+    // expanded unsafe block.
+    issue14488!(1);
+    issue14488!(2);
 }