-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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.
Type
Projects
Relationships
Development
Select code repository
Activity
eddyb commentedon Dec 19, 2017
cc @arielb1 @nikomatsakis Did anything change in pattern-matching between stable and beta?
K900 commentedon Dec 19, 2017
I'm bisecting as I'm writing this, but it's taking a while on my dual-core laptop :(
eddyb commentedon Dec 19, 2017
cc @Mark-Simulacrum
Mark-Simulacrum commentedon Dec 19, 2017
cc @est31 -- Is there a chance you could run bisect? We should really get playground to be capable of doing it...
est31 commentedon Dec 20, 2017
@Mark-Simulacrum not today, sorry. Maybe on friday...
MIR: terminate unreachable blocks in construct_const
Deewiant commentedon Dec 20, 2017
I decided to bisect this myself and found 5b1cc1d (or #45821 as a whole) to be the cause, and created #46877 to fix it.
Auto merge of #46877 - Deewiant:gh46843, r=eddyb