2019-07-02 16:30:28 -05:00
|
|
|
// build-pass (FIXME(62277): could be check-pass?)
|
2018-11-29 20:55:22 -06:00
|
|
|
|
2018-11-24 19:12:28 -06:00
|
|
|
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())
|
|
|
|
}
|
|
|
|
}
|
2018-11-29 20:55:22 -06:00
|
|
|
|
|
|
|
fn main() {}
|