Skip to content
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

rustfmt wrongly deletes labels #5926

Closed
cychen2021 opened this issue Sep 27, 2023 · 1 comment
Closed

rustfmt wrongly deletes labels #5926

cychen2021 opened this issue Sep 27, 2023 · 1 comment

Comments

@cychen2021
Copy link

match x {
    0 => 'label: {
        if some_flag {
            break 'label;
        }
        println!("hello");
    }
    _ => { println!("no hello"); }
}

becomes

match x {
    0 => {
        if some_flag {
            break 'label;
        }
        println!("hello");
    }
    _ => { println!("no hello"); }
}

after formatting.

@cychen2021 cychen2021 changed the title rustfmt wrongly delete labels rustfmt wrongly delete labels Sep 27, 2023
@cychen2021 cychen2021 changed the title rustfmt wrongly delete labels rustfmt wrongly deletes labels Sep 27, 2023
@ytmimi
Copy link
Contributor

ytmimi commented Sep 27, 2023

Thanks for the report! This is a duplicate of #5676

#5677 is already merged and fixes this issue. All that's left to do now is wait for the next release.

@ytmimi ytmimi closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2023
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

2 participants