about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-02-01 10:25:31 +0000
committerbors <bors@rust-lang.org>2021-02-01 10:25:31 +0000
commite0d9f793990d20f8f640097e28556886ba5362f0 (patch)
tree18020e46c25f2934f96ca4e067e59d0624c81b2e /compiler/rustc_parse/src
parentfee0d31397c5ac46d08867e903131d1d73825a9e (diff)
parent5b11a9722c45c147c14e2dac1e2ec2283aeb61c0 (diff)
downloadrust-e0d9f793990d20f8f640097e28556886ba5362f0.tar.gz
rust-e0d9f793990d20f8f640097e28556886ba5362f0.zip
Auto merge of #80851 - m-ou-se:panic-2021, r=petrochenkov
Implement Rust 2021 panic

This implements the Rust 2021 versions of `panic!()`. See https://github.com/rust-lang/rust/issues/80162 and https://github.com/rust-lang/rfcs/pull/3007.

It does so by replacing `{std, core}::panic!()` by a bulitin macro that expands to either `$crate::panic::panic_2015!(..)` or `$crate::panic::panic_2021!(..)` depending on the edition of the caller.

This does not yet make std's panic an alias for core's panic on Rust 2021 as the RFC proposes. That will be a separate change: https://github.com/rust-lang/rust/pull/80879/commits/c5273bdfb266c35e8eab9413aa8d58d27fdbe114 That change is blocked on figuring out what to do with https://github.com/rust-lang/rust/issues/80846 first.
Diffstat (limited to 'compiler/rustc_parse/src')
0 files changed, 0 insertions, 0 deletions