3

Github Implement Rust 2021 panic by m-ou-se · Pull Request #80851 · rust-lang/ru...

 3 years ago
source link: https://github.com/rust-lang/rust/pull/80851
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Member

m-ou-se commented on Jan 10

edited

This implements the Rust 2021 versions of panic!(). See #80162 and rust-lang/rfcs#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: c5273bd That change is blocked on figuring out what to do with #80846 first.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK