2022-05-22 16:13:25 +09:00
|
|
|
warning: function cannot return without recursing
|
2024-07-12 21:15:25 -04:00
|
|
|
--> $DIR/issue-91949-hangs-on-recursion.rs:21:1
|
2022-05-22 16:13:25 +09:00
|
|
|
|
|
|
|
|
|
LL | / fn recurse<T>(elements: T) -> Vec<char>
|
2024-05-24 14:09:40 -04:00
|
|
|
LL | |
|
2022-05-22 16:13:25 +09:00
|
|
|
LL | | where
|
|
|
|
|
LL | | T: Iterator<Item = ()>,
|
2022-07-23 14:42:54 +02:00
|
|
|
| |___________________________^ cannot return without recursing
|
|
|
|
|
LL | {
|
|
|
|
|
LL | recurse(IteratorOfWrapped(elements).map(|t| t.0))
|
|
|
|
|
| ------------------------------------------------- recursive call site
|
2022-05-22 16:13:25 +09:00
|
|
|
|
|
|
|
|
|
= help: a `loop` may express intention better if this is on purpose
|
2022-09-18 19:55:36 +04:00
|
|
|
= note: `#[warn(unconditional_recursion)]` on by default
|
2022-05-22 16:13:25 +09:00
|
|
|
|
2024-07-12 21:15:25 -04:00
|
|
|
error[E0275]: overflow evaluating the requirement `<std::iter::Empty<()> as Iterator>::Item == ()`
|
2022-05-22 16:13:25 +09:00
|
|
|
|
|
2024-07-12 21:15:25 -04:00
|
|
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "512"]` attribute to your crate (`issue_91949_hangs_on_recursion`)
|
|
|
|
|
note: required for `IteratorOfWrapped<(), std::iter::Empty<()>>` to implement `Iterator`
|
|
|
|
|
--> $DIR/issue-91949-hangs-on-recursion.rs:14:32
|
2023-03-14 14:56:16 +01:00
|
|
|
|
|
2024-07-12 21:15:25 -04:00
|
|
|
LL | impl<T, I: Iterator<Item = T>> Iterator for IteratorOfWrapped<T, I> {
|
|
|
|
|
| -------- ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
| |
|
|
|
|
|
| unsatisfied trait bound introduced here
|
|
|
|
|
= note: 256 redundant requirements hidden
|
2025-07-16 19:45:07 +00:00
|
|
|
= note: required for `IteratorOfWrapped<(), Map<IteratorOfWrapped<(), Map<..., ...>>, ...>>` to implement `Iterator`
|
|
|
|
|
= note: the full name for the type has been written to '$TEST_BUILD_DIR/issue-91949-hangs-on-recursion.long-type-$LONG_TYPE_HASH.txt'
|
|
|
|
|
= note: consider using `--verbose` to print the full type name to the console
|
2022-05-22 16:13:25 +09:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error; 1 warning emitted
|
2022-05-22 16:13:25 +09:00
|
|
|
|
2024-07-12 21:15:25 -04:00
|
|
|
For more information about this error, try `rustc --explain E0275`.
|