summaryrefslogtreecommitdiffstats
path: root/tests/ui/imports/local-modularized-tricky-fail-1.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/imports/local-modularized-tricky-fail-1.rs')
-rw-r--r--tests/ui/imports/local-modularized-tricky-fail-1.rs46
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/ui/imports/local-modularized-tricky-fail-1.rs b/tests/ui/imports/local-modularized-tricky-fail-1.rs
new file mode 100644
index 000000000..29e9b8ec8
--- /dev/null
+++ b/tests/ui/imports/local-modularized-tricky-fail-1.rs
@@ -0,0 +1,46 @@
+#![feature(decl_macro)]
+
+macro_rules! define_exported { () => {
+ #[macro_export]
+ macro_rules! exported {
+ () => ()
+ }
+}}
+macro_rules! define_panic { () => {
+ #[macro_export]
+ macro_rules! panic {
+ () => ()
+ }
+}}
+macro_rules! define_include { () => {
+ #[macro_export]
+ macro_rules! include {
+ () => ()
+ }
+}}
+
+use inner1::*;
+
+mod inner1 {
+ pub macro exported() {}
+}
+
+exported!(); //~ ERROR `exported` is ambiguous
+
+mod inner2 {
+ define_exported!();
+}
+
+fn main() {
+ panic!(); //~ ERROR `panic` is ambiguous
+}
+
+mod inner3 {
+ define_panic!();
+}
+
+mod inner4 {
+ define_include!();
+}
+
+include!(); //~ ERROR `include` is ambiguous