-
Notifications
You must be signed in to change notification settings - Fork 14k
Closed
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlregression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Milestone
Description
enum Thing { This, That }
fn non_const() -> Thing {
Thing::This
}
pub const Q: i32 = match non_const() {
Thing::This => 1,
Thing::That => 0
};error: internal compiler error: /checkout/src/librustc_mir/build/mod.rs:534: no terminator on block 10
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 (0077d128d 2017-12-14) running on x86_64-unknown-linux-gnu
thread 'rustc' panicked at 'Box<Any>', /checkout/src/librustc_errors/lib.rs:448:8
note: Run with `RUST_BACKTRACE=1` for a backtrace.
This ICEs on nightly/beta, but produces a correct error on stable.
Originally reported on Reddit here.
Metadata
Metadata
Assignees
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlregression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.