]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lazy-type-alias-impl-trait/recursion4.stderr
Rollup merge of #100479 - compiler-errors:argument-type-error-improvements, r=lcnr
[rust.git] / src / test / ui / lazy-type-alias-impl-trait / recursion4.stderr
1 error[E0277]: a value of type `Foo` cannot be built from an iterator over elements of type `_`
2   --> $DIR/recursion4.rs:10:28
3    |
4 LL |     x = std::iter::empty().collect();
5    |                            ^^^^^^^ value of type `Foo` cannot be built from `std::iter::Iterator<Item=_>`
6    |
7    = help: the trait `FromIterator<_>` is not implemented for `Foo`
8 note: required by a bound in `collect`
9   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
10    |
11 LL |     fn collect<B: FromIterator<Self::Item>>(self) -> B
12    |                   ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `collect`
13
14 error[E0277]: a value of type `impl Debug` cannot be built from an iterator over elements of type `_`
15   --> $DIR/recursion4.rs:19:28
16    |
17 LL |     x = std::iter::empty().collect();
18    |                            ^^^^^^^ value of type `impl Debug` cannot be built from `std::iter::Iterator<Item=_>`
19    |
20    = help: the trait `FromIterator<_>` is not implemented for `impl Debug`
21 note: required by a bound in `collect`
22   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
23    |
24 LL |     fn collect<B: FromIterator<Self::Item>>(self) -> B
25    |                   ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `collect`
26
27 error: aborting due to 2 previous errors
28
29 For more information about this error, try `rustc --explain E0277`.