Skip to content

'static is accepted as a loop label name #33059

Closed
@petrochenkov

Description

@petrochenkov

Compiles on stable/beta/nightly:

fn main() {
    'static: loop {
        break 'static
    }
}

Not sure if it's bad or not, but worth opening an issue.
It may conflict with a possible future block lifetime notation or something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-langRelevant to the language team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions