rust/src/test/ui/issues/issue-56202.rs
2019-07-03 06:30:28 +09:00

18 lines
275 B
Rust

// build-pass (FIXME(62277): could be check-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() {}