Skip to content

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

@kpreid

Description

@kpreid
Contributor

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

added
A-diagnosticsArea: Messages for errors, warnings, and lints
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Mar 17, 2025
zachs18

zachs18 commented on Mar 17, 2025

@zachs18
Contributor

@rustbot claim

added a commit that references this issue on Mar 19, 2025
c3f74bc
added a commit that references this issue on Mar 20, 2025
55c9732
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

    Participants

    @kpreid@zachs18

    Issue actions

      "block label not supported here" when the label is in the wrong place · Issue #138585 · rust-lang/rust