blob: f302f116980974585f8be32b48974a2c23d50e29 (
plain) (
tree)
|
|
// Checks that multiple `impl trait` in a row are valid, with generics.
use impl_trait::impl_trait;
struct Foo<T>(T);
trait Bar {
}
trait Baz {
}
impl_trait! {
impl<T> Foo<T> {
impl trait Bar {
}
impl trait Baz {
}
}
}
fn static_assert_1<T: Bar>(_t: T) {}
fn static_assert_2<T: Baz>(_t: T) {}
fn main() {
static_assert_1(Foo(()));
static_assert_2(Foo(()));
}
|