Attempting to debug in a iterator's closure without {} gives unhelpful error #88065
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The parsing of Rust source code to an AST
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=9b9dfd706291c45a1f6a567324b6c860
Given the following code:
The current output is:
Ideally the output should look like:
I was trying to debug an iterator and added a
println!
call. To my surprise, it caused the compiler to fail and emit MANY warnings. None of them pointed at the real problem which is that I was missing curly brackets{}
.The text was updated successfully, but these errors were encountered: