Incorrect suggestion with labelled breaks and blocks on nightly #87812
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
When using blocks with labelled break statements, a warning can appear to avoid confusion. The following code:
produces:
However when introducing a block via a macro:
The compiler warns:
Which suggests the incorrect code
$f(;)
, whereas it should suggest($f);
. This is only an issue on nightly, as the warning does not exist on stable.rustc --version --verbose
:The text was updated successfully, but these errors were encountered: