Panicking infra uses &core::panic::Location.
This allows us to remove `static_panic_msg` from the SSA<->LLVM boundary, along with its fat pointer representation for &str. Also changes the signature of PanicInfo::internal_contructor to avoid copying. Closes #65856.
This commit is contained in:
parent
743964ad3f
commit
aec97e050e
10 changed files with 130 additions and 127 deletions
|
|
@ -22,7 +22,7 @@
|
|||
//[thin]compile-flags: -C lto=thin
|
||||
//[fat]compile-flags: -C lto=fat
|
||||
|
||||
#![feature(core_panic)]
|
||||
#![feature(core_panic, panic_internals)]
|
||||
|
||||
// (For some reason, reproducing the LTO issue requires pulling in std
|
||||
// explicitly this way.)
|
||||
|
|
@ -51,7 +51,8 @@ fn main() {
|
|||
|
||||
let _guard = Droppable;
|
||||
let s = "issue-64655-allow-unwind-when-calling-panic-directly.rs";
|
||||
core::panicking::panic(&("???", s, 17, 4));
|
||||
let location = core::panic::Location::internal_constructor(s, 17, 4);
|
||||
core::panicking::panic("???", &location);
|
||||
});
|
||||
|
||||
let wait = handle.join();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue