rust/tests/ui/traits/issue-56202.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
238 B
Rust
Raw Normal View History

// build-pass
2018-11-25 01:12:28 +00: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())
}
}
fn main() {}