about summary refs log tree commit diff
path: root/tests/ui/error-codes/E0221.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/error-codes/E0221.rs')
-rw-r--r--tests/ui/error-codes/E0221.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/ui/error-codes/E0221.rs b/tests/ui/error-codes/E0221.rs
new file mode 100644
index 00000000000..7c7e139a098
--- /dev/null
+++ b/tests/ui/error-codes/E0221.rs
@@ -0,0 +1,27 @@
+trait T1 {}
+trait T2 {}
+
+trait Foo {
+    type A: T1;
+}
+
+trait Bar : Foo {
+    type A: T2;
+    fn do_something() {
+        let _: Self::A;
+        //~^ ERROR E0221
+    }
+}
+
+trait T3 {}
+
+trait My : std::str::FromStr {
+    type Err: T3;
+    fn test() {
+        let _: Self::Err;
+        //~^ ERROR E0221
+    }
+}
+
+fn main() {
+}