This is a tracking issue for RFC 3007 "Plan to make core and std's panic identical": https://github.com/rust-lang/rfcs/pull/3007 ### Steps - [x] Add a lint for format strings incompatible with the edition change: https://github.com/rust-lang/rust/pull/78088 - [x] Add `std::panic::panic_any`: https://github.com/rust-lang/rust/pull/74622 - [x] Stabilize `std::panic::panic_any`: Tracking issue #78500, PR #81194 - [x] Add a lint for panicking on non-string-literals (and suggest `panic_any`): #81645 - [x] Update `panic!()` documentation about non-string-literals: Part of #81645 - [x] Throw a `&str` instead of a `String` in `std` when using `core::panic!`: https://github.com/rust-lang/rust/pull/78119 - [x] Fix hygiene in `todo!()`, `assert_eq!()`, etc. to always use `core::panic!()`: https://github.com/rust-lang/rust/pull/78343 - [x] Fix `assert!(expr, message)` to call `core`'s panic mechanism directly: Part of https://github.com/rust-lang/rust/pull/78088 - [x] Fix `assert!(expr)` to call `core`'s panic mechanism directly in edition 2021: #80855 - [x] Make `{std, core}::panic!(..)` always use `format_args!(..)` in edition 2021: #80851 - [x] This needs #80850. - [x] Make `std::panic!(..)` an alias for `core::panic!(..)` in edition 2021: ~~#80879~~ Included in #80851. - [x] ~~This requires #80846 to be fixed first~~ - [x] Update `panic_fmt` lint to mention edition 2021: Part of #81645 - [x] Fix 2021's `assert!(123, "{}")` expanding to the wrong edition of `panic!()`: #81647 - [x] Rename the `panic_fmt` lint to `non_fmt_panic` (see https://github.com/rust-lang/rust/pull/78088#issuecomment-766176989): Part of #81645, beta backport in #81729
This is a tracking issue for RFC 3007 "Plan to make core and std's panic identical": rust-lang/rfcs#3007
Steps
std::panic::panic_any: Add std::panic::panic_any. #74622std::panic::panic_any: Tracking issue Tracking Issue forpanic_any#78500, PR Stabilize std::panic::panic_any. #81194panic_any): Add lint forpanic!(123)which is not accepted in Rust 2021. #81645panic!()documentation about non-string-literals: Part of Add lint forpanic!(123)which is not accepted in Rust 2021. #81645&strinstead of aStringinstdwhen usingcore::panic!: Throw core::panic!("message") as &str instead of String. #78119todo!(),assert_eq!(), etc. to always usecore::panic!(): Qualifypanic!ascore::panic!in non-built-incoremacros #78343assert!(expr, message)to callcore's panic mechanism directly: Part of Add lint for panic!("{}") #78088assert!(expr)to callcore's panic mechanism directly in edition 2021: Expand assert!(expr, args..) to include $crate for hygiene on 2021. #80855{std, core}::panic!(..)always useformat_args!(..)in edition 2021: Implement Rust 2021 panic #80851std::panic!(..)an alias forcore::panic!(..)in edition 2021:MakeIncluded in Implement Rust 2021 panic #80851.std::panic!()identical tocore::panic!()on Rust 2021 #80879This requires core::panic!() cannot be used everywhere std::panic!() can. #80846 to be fixed firstpanic_fmtlint to mention edition 2021: Part of Add lint forpanic!(123)which is not accepted in Rust 2021. #81645assert!(123, "{}")expanding to the wrong edition ofpanic!(): Fix bug with assert!() calling the wrong edition of panic!(). #81647panic_fmtlint tonon_fmt_panic(see Add lint for panic!("{}") #78088 (comment)): Part of Add lint forpanic!(123)which is not accepted in Rust 2021. #81645, beta backport in [beta] Renamepanic_fmtlint tonon_fmt_panic#81729