We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Self::Bar
1 parent 4406805 commit 4a97c52Copy full SHA for 4a97c52
src/test/ui/associated-type-bounds/super-trait-where-referencing-self.rs
@@ -0,0 +1,27 @@
1
+// check-pass
2
+
3
+// Test that we do not get a cycle due to
4
+// resolving `Self::Bar` in the where clauses
5
+// on a trait definition (in particular, in
6
+// a where clause that is defining a superpredicate).
7
8
+trait Foo {
9
+ type Bar;
10
+}
11
+trait Qux
12
+where
13
+ Self: Foo,
14
+ Self: AsRef<Self::Bar>,
15
+{
16
17
+trait Foo2 {}
18
19
+trait Qux2
20
21
+ Self: Foo2,
22
23
24
25
26
27
+fn main() {}
0 commit comments