Skip to content

ICE "break to unknown label" when while has a labeled break of itself in condition #37353

Closed
@leoyvens

Description

@leoyvens
fn main() {
    loop { 'w: while break 'w { } }
}

ICEs with:

rustc 1.14.0-nightly (6e8f92f11 2016-10-07)
error: internal compiler error: ../src/librustc/middle/liveness.rs:1057: break to unknown label
 --> <anon>:3:19
  |
3 |         'w: while break 'w { }
  |                   ^^^^^^^^

Code like this was found in issue #21751.

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions