From bb78426ca8f12f467e4d3bb38e82c0d3b6209e61 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Mon, 13 Aug 2018 13:48:47 +0200 Subject: Allow panicking with string literal messages inside constants --- src/libstd/panicking.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libstd') diff --git a/src/libstd/panicking.rs b/src/libstd/panicking.rs index 283fd36af41..862f0fd71b0 100644 --- a/src/libstd/panicking.rs +++ b/src/libstd/panicking.rs @@ -397,6 +397,7 @@ fn continue_panic_fmt(info: &PanicInfo) -> ! { #[unstable(feature = "libstd_sys_internals", reason = "used by the panic! macro", issue = "0")] +#[cfg_attr(not(any(stage0, test)), lang = "begin_panic")] #[inline(never)] #[cold] // avoid code bloat at the call sites as much as possible pub fn begin_panic(msg: M, file_line_col: &(&'static str, u32, u32)) -> ! { // Note that this should be the only allocation performed in this code path. -- cgit 1.4.1-3-g733a5