diff options
| author | Oliver Schneider <github35764891676564198441@oli-obk.de> | 2018-08-13 13:48:47 +0200 |
|---|---|---|
| committer | Oliver Schneider <github35764891676564198441@oli-obk.de> | 2018-08-22 18:28:57 +0200 |
| commit | bb78426ca8f12f467e4d3bb38e82c0d3b6209e61 (patch) | |
| tree | 80627d1053b6bb1cdcaea8f50789786613026f04 /src/libstd | |
| parent | 674ef668f13c52a1fadbf01b24d8da1e12d15e70 (diff) | |
| download | rust-bb78426ca8f12f467e4d3bb38e82c0d3b6209e61.tar.gz rust-bb78426ca8f12f467e4d3bb38e82c0d3b6209e61.zip | |
Allow panicking with string literal messages inside constants
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/panicking.rs | 1 |
1 files changed, 1 insertions, 0 deletions
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<M: Any + Send>(msg: M, file_line_col: &(&'static str, u32, u32)) -> ! { // Note that this should be the only allocation performed in this code path. |
