Skip to content

error: internal compiler error: librustc/middle/liveness.rs:1081: loop scope error: unlabeled control flow (break or continue) in while condition #50802

Closed
@vegard

Description

@vegard

Input:

#[allow(unreachable_code)]
fn main() {
    loop {
        break while continue {
        }
    }
}

Output:

$ rustc -
error: internal compiler error: librustc/middle/liveness.rs:1081: loop scope error: unlabeled control flow (break or continue) in while condition
 --> <anon>:4:21
  |
4 |         break while continue {
  |                     ^^^^^^^^

thread 'main' panicked at 'Box<Any>', librustc_errors/lib.rs:499:9
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: aborting due to previous error


note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.27.0-dev running on x86_64-unknown-linux-gnu

This is on commit eca0da5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions