summaryrefslogtreecommitdiffstats
path: root/tests/ui/associated-inherent-types/ambiguity.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/associated-inherent-types/ambiguity.rs')
-rw-r--r--tests/ui/associated-inherent-types/ambiguity.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/associated-inherent-types/ambiguity.rs b/tests/ui/associated-inherent-types/ambiguity.rs
new file mode 100644
index 000000000..73920555b
--- /dev/null
+++ b/tests/ui/associated-inherent-types/ambiguity.rs
@@ -0,0 +1,16 @@
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+struct Wrapper<T>(T);
+
+impl Wrapper<i32> {
+ type Foo = i32;
+}
+
+impl Wrapper<()> {
+ type Foo = ();
+}
+
+fn main() {
+ let _: Wrapper<_>::Foo = (); //~ ERROR multiple applicable items in scope
+}