summary refs log tree commit diff stats
path: root/tests/12-combining-generics.rs
blob: 0401887ab66c2a23853817e3109f2ad765d9402b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Checks that the impl trait can have its own generics.

use impl_trait::impl_trait;

struct Foo<T>(T);
trait Bar<U> {
}

impl_trait! {
    impl<T> Foo<T> {
        impl trait<U> Bar<U> {
        }
    }
}

fn static_assert_1<T: Bar<U>, U>(_t: T, _u: U) {}

fn main() {
    static_assert_1(Foo(()), ());
}