rust/compiler/rustc_mir
Jonas Schievink 0a06d7344b
Rollup merge of #78069 - fusion-engineering-forks:core-const-panic-str, r=RalfJung
Fix const core::panic!(non_literal_str).

Invocations of `core::panic!(x)` where `x` is not a string literal expand to `panic!("{}", x)`, which is not understood by the const panic logic right now. This adds `panic_str` as a lang item, and modifies the const eval implementation to hook into this item as well.

This fixes the issue mentioned here: https://github.com/rust-lang/rust/issues/51999#issuecomment-687604248

r? `@RalfJung`

`@rustbot` modify labels: +A-const-eval
2020-10-24 22:39:49 +02:00
..
src Rollup merge of #78069 - fusion-engineering-forks:core-const-panic-str, r=RalfJung 2020-10-24 22:39:49 +02:00
Cargo.toml Use tracing spans to trace the entire MIR interp stack 2020-09-28 20:07:57 +02:00