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