summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/missing-assoc-fn.rs
blob: 9af8e5a939d6576fa30b2b63d9a69fbfcb67c45d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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;
    fn bat<T: TraitB<Item: Copy>>(_: T) -> Self; //~ ERROR associated type bounds are unstable
}

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() {}