rust/src/test/ui/issues/issue-56202.rs
2018-11-30 15:42:43 +00:00

18 lines
240 B
Rust

// compile-pass
trait FooTrait {}
trait BarTrait {
fn foo<T: FooTrait>(_: T) -> Self;
}
struct FooStruct(u32);
impl BarTrait for FooStruct {
fn foo<T: FooTrait>(_: T) -> Self {
Self(u32::default())
}
}
fn main() {}