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

Labelled break outside of for loop doesn't work #7299

Closed
hoelzro opened this issue Jun 22, 2013 · 1 comment
Closed

Labelled break outside of for loop doesn't work #7299

hoelzro opened this issue Jun 22, 2013 · 1 comment

Comments

@hoelzro
Copy link
Contributor

hoelzro commented Jun 22, 2013

(using Rust compiled from commit dc4560d)

The following code fails to compile:

fn main() {
    'outer: loop {
        match () {
            () => {
                for std::uint::iterate(0, 8) |_| {
                    loop {
                        break 'outer;
                    }
                }
            },
        }
    }
}

with the following error:

/tmp/test.rs:7:24: 7:37 error: internal compiler error: Break to unknown label   
/tmp/test.rs:7                         break 'outer;
                                             ^~~~~~~~~~~~~

If you comment out the for loop, it compiles fine.

@catamorphism
Copy link
Contributor

This is a known bug - #4131 . I'm closing this as a duplicate, but keep the bug reports coming! It's always better to have a duplicate than to miss out on hearing about an unreported bug.

flip1995 pushed a commit to flip1995/rust that referenced this issue Jul 1, 2021
Add macro_braces lint to check for irregular brace use in certain macros

The name is a bit long but this sounds good as `#[allow(unconventional_macro_braces)]` and it seems more clear that we are talking about the macro call not macro definitions, any feedback let me know. Thanks!
fixes rust-lang#7278

changelog: Add ``[`unconventional_macro_braces`]`` lint that checks for uncommon brace usage with macros.
flip1995 pushed a commit to flip1995/rust that referenced this issue Jul 1, 2021
…p1995

Fixed broken deploy script due to multiline configuration docs

The deploy script on master currently runs into an error (See [log](https://github.com/rust-lang/rust-clippy/runs/2865828873)) due to the new configuration documentation added in rust-lang#7299. The current documentation collection for the configuration macro sadly doesn't support multiline doc comments. This will be changes in the future with the new metadata collector tracked in rust-lang#7172 For now we have to use `<br>` inside doc comments to add paragraphs.

This PR restricts `define_Conf!` macro to single lines and adds a comment explaining the reasoning behind it. It also adjusted the actual document parsing to fix a bug. (The parsing was automatically stopping on the first curly bracket, even if it was part of a doc comment).

changelog: none
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