fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0277]: the trait bound `Option<Vec<u8>>: MyFromIterator<&u8>` is not satisfied 2 --> $DIR/on-trait.rs:28:30 3 | 4LL | let y: Option<Vec<u8>> = collect(x.iter()); // this should give approximately the same error for x.iter().collect() 5 | ^^^^^^^ a collection of type `Option<Vec<u8>>` cannot be built from an iterator over elements of type `&u8` 6 | 7 = help: the trait `MyFromIterator<&u8>` is not implemented for `Option<Vec<u8>>` 8help: this trait has no implementations, consider adding one 9 --> $DIR/on-trait.rs:17:1 10 | 11LL | trait MyFromIterator<A> { 12 | ^^^^^^^^^^^^^^^^^^^^^^^ 13note: required by a bound in `collect` 14 --> $DIR/on-trait.rs:22:39 15 | 16LL | fn collect<A, I: Iterator<Item=A>, B: MyFromIterator<A>>(it: I) -> B { 17 | ^^^^^^^^^^^^^^^^^ required by this bound in `collect` 18 19error[E0277]: the trait bound `String: Foo<u8, _, u32>` is not satisfied 20 --> $DIR/on-trait.rs:31:21 21 | 22LL | let x: String = foobar(); 23 | ^^^^^^ test error `String` with `u8` `_` `u32` in `Foo` 24 | 25 = help: the trait `Foo<u8, _, u32>` is not implemented for `String` 26help: this trait has no implementations, consider adding one 27 --> $DIR/on-trait.rs:7:3 28 | 29LL | pub trait Foo<Bar, Baz, Quux> {} 30 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 31note: required by a bound in `foobar` 32 --> $DIR/on-trait.rs:12:24 33 | 34LL | fn foobar<U: Clone, T: Foo<u8, U, u32>>() -> T { 35 | ^^^^^^^^^^^^^^^ required by this bound in `foobar` 36 37error: aborting due to 2 previous errors 38 39For more information about this error, try `rustc --explain E0277`.