rust/src/test/ui/issues/issue-56202.rs
2019-11-04 16:03:46 +01:00

18 lines
238 B
Rust

// build-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() {}