summaryrefslogtreecommitdiffstats
path: root/tests/ui/shadowed/shadowed-use-visibility.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/shadowed/shadowed-use-visibility.rs')
-rw-r--r--tests/ui/shadowed/shadowed-use-visibility.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/shadowed/shadowed-use-visibility.rs b/tests/ui/shadowed/shadowed-use-visibility.rs
new file mode 100644
index 000000000..6b801972f
--- /dev/null
+++ b/tests/ui/shadowed/shadowed-use-visibility.rs
@@ -0,0 +1,16 @@
+mod foo {
+ pub fn f() {}
+
+ use foo as bar;
+ pub use self::f as bar;
+}
+
+mod bar {
+ use foo::bar::f as g; //~ ERROR module import `bar` is private
+
+ use foo as f;
+ pub use foo::*;
+}
+
+use bar::f::f; //~ ERROR module import `f` is private
+fn main() {}