"Consider adding a semicolon here" for a closure without block #97359
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=cc081036ff00b0844aac10d9fdac636f
The current output is:
Ideally rustc should suggest adding a semicolon (and a block):
It already does that if we have a block https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=433c9f8d9638e927fe4f5ba66d5551fa:
@rustbot label +A-suggestion-diagnostics
@rustbot claim
Noticed by this StackOverflow question.
The text was updated successfully, but these errors were encountered: