Skip to content

ICE in universal_regions.rs when compiling bitflags using NLL #46717

@est31

Description

@est31

Clone https://github.com/rust-lang-nursery/bitflags and trying to compile it with NLL enabled gives you an ICE:

$ RUSTFLAGS="-Zborrowck=mir -Z nll" cargo build
error: internal compiler error: /checkout/src/librustc_mir/borrow_check/nll/universal_regions.rs:496: impossible case reached

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.24.0-nightly (6a3601944 2017-12-12) running on x86_64-unknown-linux-gnu

thread 'rustc' panicked at 'Box<Any>', /checkout/src/librustc_errors/lib.rs:501:8
note: Run with `RUST_BACKTRACE=1` for a backtrace.

error: Could not compile `bitflags`.

To learn more, run the command again with --verbose.

Minimized testcase:

pub struct Foo;
pub const FOO: Foo = Foo;

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-NLLArea: Non-lexical lifetimes (NLL)I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions