about summary refs log tree commit diff
path: root/tests/ui/modules/issue-56411.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/modules/issue-56411.rs')
-rw-r--r--tests/ui/modules/issue-56411.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/modules/issue-56411.rs b/tests/ui/modules/issue-56411.rs
new file mode 100644
index 00000000000..0a20f5fe985
--- /dev/null
+++ b/tests/ui/modules/issue-56411.rs
@@ -0,0 +1,18 @@
+macro_rules! import {
+    ( $(($path:expr, $name:ident)),* ) => {
+        $(
+            #[path = $path]
+            mod $name;
+            pub use self::$name;
+            //~^ ERROR the name `issue_56411_aux` is defined multiple times
+            //~| ERROR `issue_56411_aux` is only public within the crate, and cannot be re-exported outside
+
+        )*
+    }
+}
+
+import!(("issue-56411-aux.rs", issue_56411_aux));
+
+fn main() {
+    println!("Hello, world!");
+}