summary refs log blame commit diff stats
path: root/tests/13-trait-generics.rs
blob: 889d16864c6e83f14e48a47ce5b040c8784ff8ae (plain) (tree)



















                                                                                          
// 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, ());
}