summaryrefslogtreecommitdiffstats
path: root/tests/ui/privacy/macro-private-reexport.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/privacy/macro-private-reexport.rs')
-rw-r--r--tests/ui/privacy/macro-private-reexport.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/privacy/macro-private-reexport.rs b/tests/ui/privacy/macro-private-reexport.rs
new file mode 100644
index 000000000..d0aab528e
--- /dev/null
+++ b/tests/ui/privacy/macro-private-reexport.rs
@@ -0,0 +1,17 @@
+// edition:2021
+
+#![feature(decl_macro)]
+
+mod foo {
+ macro_rules! bar {
+ () => {};
+ }
+
+ pub use bar as _; //~ ERROR `bar` is only public within the crate, and cannot be re-exported outside
+
+ macro baz() {}
+
+ pub use baz as _; //~ ERROR `baz` is private, and cannot be re-exported
+}
+
+fn main() {}