2020-01-30 21:01:31 -06:00
|
|
|
trait TraitB {
|
|
|
|
type Item;
|
|
|
|
}
|
|
|
|
|
|
|
|
trait TraitA<A> {
|
|
|
|
fn foo<T: TraitB<Item = A>>(_: T) -> Self;
|
|
|
|
fn bar<T>(_: T) -> Self;
|
|
|
|
fn baz<T>(_: T) -> Self where T: TraitB, <T as TraitB>::Item: Copy;
|
2024-03-05 12:23:01 -06:00
|
|
|
fn bat<T: TraitB<Item: Copy>>(_: T) -> Self;
|
2020-01-30 21:01:31 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
struct S;
|
|
|
|
|
|
|
|
impl TraitA<()> for S { //~ ERROR not all trait items implemented
|
|
|
|
}
|
|
|
|
|
|
|
|
use std::iter::FromIterator;
|
|
|
|
struct X;
|
|
|
|
impl FromIterator<()> for X { //~ ERROR not all trait items implemented
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|