]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-type-bounds/issue-61752.rs
Auto merge of #103894 - mati865:gnullvm-libunwind-changes, r=thomcc
[rust.git] / src / test / ui / associated-type-bounds / issue-61752.rs
1 // check-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 }