1 error[E0277]: a value of type `Foo` cannot be built from an iterator over elements of type `_`
2 --> $DIR/recursion4.rs:10:9
4 LL | x = std::iter::empty().collect();
5 | ^^^^^^^^^^^^^^^^^^ ------- required by a bound introduced by this call
7 | value of type `Foo` cannot be built from `std::iter::Iterator<Item=_>`
9 = help: the trait `FromIterator<_>` is not implemented for `Foo`
10 note: required by a bound in `collect`
11 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
13 LL | fn collect<B: FromIterator<Self::Item>>(self) -> B
14 | ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `collect`
16 error[E0277]: a value of type `impl Debug` cannot be built from an iterator over elements of type `_`
17 --> $DIR/recursion4.rs:19:9
19 LL | x = std::iter::empty().collect();
20 | ^^^^^^^^^^^^^^^^^^ ------- required by a bound introduced by this call
22 | value of type `impl Debug` cannot be built from `std::iter::Iterator<Item=_>`
24 = help: the trait `FromIterator<_>` is not implemented for `impl Debug`
25 note: required by a bound in `collect`
26 --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
28 LL | fn collect<B: FromIterator<Self::Item>>(self) -> B
29 | ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `collect`
31 error: aborting due to 2 previous errors
33 For more information about this error, try `rustc --explain E0277`.