2020-01-30 21:01:31 -06:00
|
|
|
// run-rustfix
|
|
|
|
trait TraitB {
|
|
|
|
type Item;
|
|
|
|
}
|
|
|
|
|
|
|
|
trait TraitA<A> {
|
|
|
|
type Type;
|
|
|
|
fn bar<T>(_: T) -> Self;
|
|
|
|
fn baz<T>(_: T) -> Self where T: TraitB, <T as TraitB>::Item: Copy;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct S;
|
|
|
|
struct Type;
|
|
|
|
|
|
|
|
impl TraitA<()> for S { //~ ERROR not all trait items implemented
|
2020-09-02 02:40:56 -05:00
|
|
|
fn baz<T>(_: T) -> Self where T: TraitB, <T as TraitB>::Item: Copy { todo!() }
|
2020-01-31 13:35:37 -06:00
|
|
|
fn bar<T>(_: T) -> Self { todo!() }
|
2020-01-30 21:01:31 -06:00
|
|
|
type Type = Type;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|