2020-09-02 10:40:56 +03:00
|
|
|
error[E0277]: the trait bound `Option<Vec<u8>>: MyFromIterator<&u8>` is not satisfied
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/on-trait.rs:28:30
|
2017-06-30 17:06:51 -07:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | let y: Option<Vec<u8>> = collect(x.iter()); // this should give approximately the same error for x.iter().collect()
|
2024-01-24 02:52:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^ a collection of type `Option<Vec<u8>>` cannot be built from an iterator over elements of type `&u8`
|
2017-06-30 17:06:51 -07:00
|
|
|
|
|
2020-09-02 10:40:56 +03:00
|
|
|
= help: the trait `MyFromIterator<&u8>` is not implemented for `Option<Vec<u8>>`
|
2023-09-10 03:33:07 +00:00
|
|
|
help: this trait has no implementations, consider adding one
|
|
|
|
--> $DIR/on-trait.rs:17:1
|
|
|
|
|
|
|
|
|
LL | trait MyFromIterator<A> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
2021-07-31 09:26:55 -07:00
|
|
|
note: required by a bound in `collect`
|
|
|
|
--> $DIR/on-trait.rs:22:39
|
|
|
|
|
|
|
|
|
LL | fn collect<A, I: Iterator<Item=A>, B: MyFromIterator<A>>(it: I) -> B {
|
|
|
|
| ^^^^^^^^^^^^^^^^^ required by this bound in `collect`
|
2017-06-30 17:06:51 -07:00
|
|
|
|
2020-09-02 10:40:56 +03:00
|
|
|
error[E0277]: the trait bound `String: Foo<u8, _, u32>` is not satisfied
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/on-trait.rs:31:21
|
2017-06-30 17:06:51 -07:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | let x: String = foobar();
|
2024-01-24 02:52:29 +00:00
|
|
|
| ^^^^^^^^ test error `String` with `u8` `_` `u32` in `Foo`
|
2017-06-30 17:06:51 -07:00
|
|
|
|
|
2020-09-02 10:40:56 +03:00
|
|
|
= help: the trait `Foo<u8, _, u32>` is not implemented for `String`
|
2023-09-10 03:33:07 +00:00
|
|
|
help: this trait has no implementations, consider adding one
|
|
|
|
--> $DIR/on-trait.rs:7:3
|
|
|
|
|
|
|
|
|
LL | pub trait Foo<Bar, Baz, Quux> {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-07-31 09:26:55 -07:00
|
|
|
note: required by a bound in `foobar`
|
|
|
|
--> $DIR/on-trait.rs:12:24
|
|
|
|
|
|
|
|
|
LL | fn foobar<U: Clone, T: Foo<u8, U, u32>>() -> T {
|
|
|
|
| ^^^^^^^^^^^^^^^ required by this bound in `foobar`
|
2017-06-30 17:06:51 -07:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2018-03-03 15:59:40 +01:00
|
|
|
For more information about this error, try `rustc --explain E0277`.
|