summaryrefslogtreecommitdiffstats
path: root/src/test/ui/modules/issue-56411.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/modules/issue-56411.rs')
-rw-r--r--src/test/ui/modules/issue-56411.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/modules/issue-56411.rs b/src/test/ui/modules/issue-56411.rs
new file mode 100644
index 000000000..0a20f5fe9
--- /dev/null
+++ b/src/test/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!");
+}