1
Fork 0

Deduplicate panic_fmt

std's begin_panic_fmt and core's panic_fmt are duplicates.
Merge them to declutter code and remove a lang item.
This commit is contained in:
Gary Guo 2021-09-11 03:44:02 +01:00
parent 148f456cc6
commit 9370156957
9 changed files with 15 additions and 35 deletions

View file

@ -82,7 +82,6 @@ pub fn is_lang_panic_fn(tcx: TyCtxt<'tcx>, def_id: DefId) -> bool {
|| Some(def_id) == tcx.lang_items().panic_display()
|| Some(def_id) == tcx.lang_items().begin_panic_fn()
|| Some(def_id) == tcx.lang_items().panic_fmt()
|| Some(def_id) == tcx.lang_items().begin_panic_fmt()
}
pub fn rustc_allow_const_fn_unstable(