Skip to content

'static is accepted as a loop label name #33059

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-langRelevant to the language team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions