]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/auxiliary/macro_rules.rs
Prevent `mem_replace_with_default` lint within macros
[rust.git] / tests / ui / auxiliary / macro_rules.rs
index 504d6733abfe0f5f885f06893938e1b2f5360559..eafc68bd6bcf45d7377a20555f07635f7aee7ecb 100644 (file)
@@ -39,3 +39,10 @@ macro_rules! string_add {
         let z = y + "...";
     };
 }
+
+#[macro_export]
+macro_rules! take_external {
+    ($s:expr) => {
+        std::mem::replace($s, Default::default())
+    };
+}