mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-05 11:47:13 +00:00

Mark the panic_no_unwind lang item as nounwind This has 2 effects: - It helps LLVM when inlining since it doesn't need to generate landing pads for `panic_no_unwind`. - It makes it sound for a panic handler to unwind even if `PanicInfo::can_unwind` returns true. This will simply cause another panic once the unwind tries to go past the `panic_no_unwind` lang item. Eventually this will cause a stack overflow, which is safe.
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.