summary refs log tree commit diff stats
path: root/tests/13-trait-generics.rs
blob: 889d16864c6e83f14e48a47ce5b040c8784ff8ae (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 generics without the inherent impl having generics.

use impl_trait::impl_trait;

struct Foo;
trait Bar<U> {
}

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

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

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