rust/library/core
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
..
benches Remove redundant 'static from library crates 2020-10-18 17:25:51 +02:00
src Rollup merge of #78069 - fusion-engineering-forks:core-const-panic-str, r=RalfJung 2020-10-24 22:39:49 +02:00
tests Check for exhaustion in SliceIndex for RangeInclusive 2020-10-20 17:18:08 -07:00
Cargo.toml