summaryrefslogtreecommitdiffstats
path: root/src/test/ui/imports/inaccessible_type_aliases.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/imports/inaccessible_type_aliases.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/imports/inaccessible_type_aliases.rs b/src/test/ui/imports/inaccessible_type_aliases.rs
new file mode 100644
index 000000000..c3d4214e2
--- /dev/null
+++ b/src/test/ui/imports/inaccessible_type_aliases.rs
@@ -0,0 +1,14 @@
+mod a {
+ type Foo = u64;
+ type Bar = u64;
+}
+
+mod b {
+ type Foo = u64;
+}
+
+fn main() {
+ let x: Foo = 100; //~ ERROR: cannot find type `Foo` in this scope
+ let y: Bar = 100; //~ ERROR: cannot find type `Bar` in this scope
+ println!("x: {}, y: {}", x, y);
+}