summaryrefslogtreecommitdiffstats
path: root/tests/ui/self/self-shadowing-import.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/self/self-shadowing-import.rs')
-rw-r--r--tests/ui/self/self-shadowing-import.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/self/self-shadowing-import.rs b/tests/ui/self/self-shadowing-import.rs
new file mode 100644
index 000000000..1d60c6c22
--- /dev/null
+++ b/tests/ui/self/self-shadowing-import.rs
@@ -0,0 +1,16 @@
+// run-pass
+
+mod a {
+ pub mod b {
+ pub mod a {
+ pub fn foo() -> isize { return 1; }
+ }
+ }
+}
+
+mod c {
+ use a::b::a;
+ pub fn bar() { assert_eq!(a::foo(), 1); }
+}
+
+pub fn main() { c::bar(); }