Change:
}; let msg = match msg { AssertKind::DivisionByZero(op) => { <del> AssertKind::DivisionByZero(eval_to_int(op)) </del> <ins> Some(AssertKind::DivisionByZero(eval_to_int(op))) </ins> } AssertKind::RemainderByZero(op) => { <del> AssertKind::RemainderByZero(eval_to_int(op)) </del> <ins> Some(AssertKind::RemainderByZero(eval_to_int(op))) </ins> } AssertKind::BoundsCheck { ref len, ref index } => { let len = eval_to_int(len); let index = eval_to_int(index); <del> AssertKind::BoundsCheck { len, index } </del> <ins> Some(AssertKind::BoundsCheck { len, index }) </ins> } // Overflow is are already covered by checks on the binary operators. <del> AssertKind::Overflow(..) | AssertKind::OverflowNeg(_) => return, </del> <ins> AssertKind::Overflow(..) | AssertKind::OverflowNeg(_) => None, </ins> // Need proper const propagator for these. <del> _ => return, </del> <ins> _ => None, </ins> }; <del> self.report_assert_as_lint( lint::builtin::UNCONDITIONAL_PANIC, source_info, "this operation will panic at runtime", msg, ); </del> <ins> // Poison all places this operand references so that further code // doesn't use the invalid value match cond { Operand::Move(ref place) | Operand::Copy(ref place) => { Self::remove_const(&mut self.ecx, place.local); } Operand::Constant(_) => {} } if let Some(msg) = msg { self.report_assert_as_lint( lint::builtin::UNCONDITIONAL_PANIC, source_info, "this operation will panic at runtime", msg, ); } </ins> } else { if self.should_const_prop(value) { if let ScalarMaybeUninit::Scalar(scalar) = value_const {

Discussion:
UPDATE: MCVE can be found . Nightly compilation error due to rustc bug I tried this code: I expected to see this happen: explanation Successful compilation. Instead, this happened: tells to report a bug, see backtrace. : Reproduce with (1st update) <details<summaryBacktrace</summary<p</p</details
cc
Also occured with
I'm getting this when I try to repro: On a side note, are there any cargo feature flags I can pass to cut down on how much stuff is being compiled? Compiling 900 crates to get a repo is quite a lot
Also occured with just now.
mmh try with commit hash ? (for )
updated script:
Yeah, sorry for that. One of the difficulties of working with a big framework like Substrate. I'll see if I can narrow it down more.
That did it! Thank you
Some with the same issue (a different chain also using Substrate) found out that apparently works.
Seems is the cause, marking as .
Here's a smaller repro (at least in terms of how much code is built: 33 crates instead of a few hundred):
just confirmed that it does not occur with
I have a minimal repro:
Wild guess: erases the local before we are able to emit the diagnostic message.
I seem to be getting a similar error again on a more current nightly (). Should I open a new issue or do we just reopen this one?
This is still broken. I'm pretty confused because running the test you in on the shows that it ICEs. Is the test not actually working for some reason? Edit: Does that test need in order to actually check the body of those functions since they are uncalled from ?
Assigning as and removing I-prioritize.
Hi and have either of you had a chance to upgrade to a recently nightly? I just wanted to confirm this is fixed for you.
I've updated to rust version 1.47.0-nightly ( 2020-07-22), and tried compiling the crate which was triggering this ICE (). I no longer encounter an ICE, the crate compiles successfully.
I can confirm is not throwing ICE :+1:
Great, thank you!