]>
Commit | Line | Data |
---|---|---|
1b1a35ee | 1 | error[E0277]: the trait bound `Option<Vec<u8>>: MyFromIterator<&u8>` is not satisfied |
0731742a | 2 | --> $DIR/on-trait.rs:28:30 |
041b39d2 | 3 | | |
0531ce1d | 4 | LL | let y: Option<Vec<u8>> = collect(x.iter()); // this should give approximately the same error for x.iter().collect() |
1b1a35ee | 5 | | ^^^^^^^ a collection of type `Option<Vec<u8>>` cannot be built from an iterator over elements of type `&u8` |
041b39d2 | 6 | | |
1b1a35ee | 7 | = help: the trait `MyFromIterator<&u8>` is not implemented for `Option<Vec<u8>>` |
94222f64 XL |
8 | note: required by a bound in `collect` |
9 | --> $DIR/on-trait.rs:22:39 | |
10 | | | |
11 | LL | fn collect<A, I: Iterator<Item=A>, B: MyFromIterator<A>>(it: I) -> B { | |
12 | | ^^^^^^^^^^^^^^^^^ required by this bound in `collect` | |
041b39d2 | 13 | |
1b1a35ee | 14 | error[E0277]: the trait bound `String: Foo<u8, _, u32>` is not satisfied |
0731742a | 15 | --> $DIR/on-trait.rs:31:21 |
041b39d2 | 16 | | |
532ac7d7 | 17 | LL | let x: String = foobar(); |
1b1a35ee | 18 | | ^^^^^^ test error `String` with `u8` `_` `u32` in `Foo` |
041b39d2 | 19 | | |
1b1a35ee | 20 | = help: the trait `Foo<u8, _, u32>` is not implemented for `String` |
94222f64 XL |
21 | note: required by a bound in `foobar` |
22 | --> $DIR/on-trait.rs:12:24 | |
23 | | | |
24 | LL | fn foobar<U: Clone, T: Foo<u8, U, u32>>() -> T { | |
25 | | ^^^^^^^^^^^^^^^ required by this bound in `foobar` | |
041b39d2 XL |
26 | |
27 | error: aborting due to 2 previous errors | |
28 | ||
0531ce1d | 29 | For more information about this error, try `rustc --explain E0277`. |