Skip to content

Fmt break to raw_ident label fail #6550

Closed as duplicate of#6411
Closed as duplicate of#6411
@A4-Tacks

Description

@A4-Tacks
fn main() {
    'r#break: {
        break 'r#break;
    }
}

Run rustfmt --edition 2024:

fn main() {
    'r#break: {
        break 'break;
    }
}

cargo check formatted:

error: invalid label name `'break`
 --> src/main.rs:3:15
  |
3 |         break 'break;
  |               ^^^^^^

error: could not compile `test_` (bin "test_") due to 1 previous error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions