summaryrefslogtreecommitdiffstats
path: root/src/test/ui/hygiene/privacy.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/hygiene/privacy.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/hygiene/privacy.rs b/src/test/ui/hygiene/privacy.rs
new file mode 100644
index 000000000..78d255553
--- /dev/null
+++ b/src/test/ui/hygiene/privacy.rs
@@ -0,0 +1,18 @@
+#![feature(decl_macro)]
+
+mod foo {
+ fn f() {}
+
+ pub macro m($e:expr) {
+ f();
+ self::f();
+ ::foo::f();
+ $e
+ }
+}
+
+fn main() {
+ foo::m!(
+ foo::f() //~ ERROR `f` is private
+ );
+}