]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/associated-types/point-at-type-on-obligation-failure-2.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / associated-types / point-at-type-on-obligation-failure-2.rs
index 9360d96f05e174a29c7a38389f3f37c7e6e621a8..67b7c78071c378af04253c203f6e6b2fe652878e 100644 (file)
@@ -8,4 +8,20 @@ impl Foo for () {
     type Assoc = bool; //~ ERROR the trait bound `bool: Bar` is not satisfied
 }
 
+trait Baz where Self::Assoc: Bar {
+    type Assoc;
+}
+
+impl Baz for () {
+    type Assoc = bool; //~ ERROR the trait bound `bool: Bar` is not satisfied
+}
+
+trait Bat where <Self as Bat>::Assoc: Bar {
+    type Assoc;
+}
+
+impl Bat for () {
+    type Assoc = bool; //~ ERROR the trait bound `bool: Bar` is not satisfied
+}
+
 fn main() {}