]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/missing-assoc-fn.rs
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / missing-assoc-fn.rs
1 trait TraitB {
2     type Item;
3 }
4
5 trait TraitA<A> {
6     fn foo<T: TraitB<Item = A>>(_: T) -> Self;
7     fn bar<T>(_: T) -> Self;
8     fn baz<T>(_: T) -> Self where T: TraitB, <T as TraitB>::Item: Copy;
9     fn bat<T: TraitB<Item: Copy>>(_: T) -> Self; //~ ERROR associated type bounds are unstable
10 }
11
12 struct S;
13
14 impl TraitA<()> for S { //~ ERROR not all trait items implemented
15 }
16
17 use std::iter::FromIterator;
18 struct X;
19 impl FromIterator<()> for X { //~ ERROR not all trait items implemented
20 }
21
22 fn main() {}