Unintuitive error when recursing with generic Fn closure borrow #99250
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
i understand why this error happens, it might just be nice to have some sort of system to detect
when this kind of recursion is happening and try to prevent it or at least hint at what the error
could be better.
Given the following code:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=1974b5d37cb10e1214937db3c0e779dc
The current output is:
/playground/target/debug/deps/playground-f30fbb6d88a6f004.long-type.txt
:<iter::adapters::GenericShunt<Map<std::vec::IntoIter<String>, &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&[closure@error/src/main.rs:9:41: 14:6]>, Result<Infallible, ()>> as Iterator>::collect::<Vec<String>>
Ideally the output should look like:
The text was updated successfully, but these errors were encountered: