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.
1 parent e0712c8 commit 4e0e645Copy full SHA for 4e0e645
src/test/ui/associated-type-bounds/issue-61752.rs
@@ -0,0 +1,24 @@
1
+// run-pass
2
+
3
+#![feature(associated_type_bounds)]
4
5
+trait Foo {
6
+ type Bar;
7
+}
8
9
+impl Foo for () {
10
+ type Bar = ();
11
12
13
+fn a<F: Foo>() where F::Bar: Copy {}
14
15
+fn b<F: Foo>() where <F as Foo>::Bar: Copy {}
16
17
+// This used to complain about ambiguous associated types.
18
+fn c<F: Foo<Bar: Foo>>() where F::Bar: Copy {}
19
20
+fn main() {
21
+ a::<()>();
22
+ b::<()>();
23
+ c::<()>();
24
0 commit comments