Skip to content

Fmt break to raw_ident label fail #6550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
A4-Tacks opened this issue Apr 25, 2025 · 0 comments
Open

Fmt break to raw_ident label fail #6550

A4-Tacks opened this issue Apr 25, 2025 · 0 comments

Comments

@A4-Tacks
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant