Skip to content

"block label not supported here" when the label is in the wrong place #138585

Description

@kpreid

Code

fn main() {
    loop 'a: { return; }
}

Current output

error: block label not supported here
 --> src/main.rs:2:10
  |
2 |     loop 'a: { return; }
  |          ^^^ not supported here

Desired output

error: misplaced loop label
 --> src/main.rs:2:10
  |
2 |     loop 'a: { return; }
  |          ^^^ not supported here
  help: change this to `'a: loop {`

Rust Version

1.85.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions