about summary refs log tree commit diff
path: root/library/std/src/panic.rs
AgeCommit message (Collapse)AuthorLines
2025-05-24rename internal panicking::try to catch_unwindRalf Jung-1/+1
2025-04-27use generic Atomic type where possibleChristopher Durham-2/+2
in core/alloc/std only for now, and ignoring test files Co-authored-by: Pavel Grigorenko <GrigorenkoPV@ya.ru>
2025-02-18add last std diagnostic items for clippycyrgani-0/+1
2025-02-13std: Apply dependency_on_unit_never_type_fallbackEric Huss-1/+3
This generates a warning of irrefutable patterns. I decided to slightly tweak the example so the closure returns unit, since the intent wasn't to show the weird behavior of returning `!`.
2025-01-26Move std::panic unit tests to integration testsbjorn3-3/+0
2024-09-29Auto merge of #128321 - BatmanAoD:catch-unwind-doc-update, r=Mark-Simulacrumbors-24/+34
Update `catch_unwind` doc comments for `c_unwind` Updates `catch_unwind` doc comments to indicate that catching a foreign exception _will no longer_ be UB. Instead, there are two possible behaviors, though it is not specified which one an implementation will choose. Nominated for t-lang to confirm that they are okay with making such a promise based on t-opsem FCP, or whether they would like to be included in the FCP. Related: https://github.com/rust-lang/rust/issues/74990, https://github.com/rust-lang/rust/issues/115285, https://github.com/rust-lang/reference/pull/1226
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-2/+2
2024-09-15update docs for `catch_unwind` & related funcsKyle J Strand-24/+34
Documentation comments for `catch_unwind` and `thread::join` to indicate new behavioral guarantee when catching a foreign exception.
2024-09-14add std::panic::abort_unwindChristopher Durham-0/+3
2024-08-12std: do not overwrite style in `get_backtrace_style`joboet-11/+15
If another thread calls `set_backtrace_style` while a `get_backtrace_style` is reading the environment variables, `get_backtrace_style` will overwrite the value. Use an atomic CAS to avoid this.
2024-08-03chore: refactor backtrace style in panicKonippi-19/+10
2024-07-30Auto merge of #128083 - Mark-Simulacrum:bump-bootstrap, r=albertlarsan68bors-1/+1
Bump bootstrap compiler to new beta https://forge.rust-lang.org/release/process.html#master-bootstrap-update-t-2-day-tuesday
2024-07-29Reformat `use` declarations.Nicholas Nethercote-10/+5
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-28Update CURRENT_RUSTC_VERSIONMark Rousskov-1/+1
2024-07-26Fix doc nitsJohn Arundel-3/+3
Many tiny changes to stdlib doc comments to make them consistent (for example "Returns foo", rather than "Return foo", per RFC1574), adding missing periods, paragraph breaks, backticks for monospace style, and other minor nits. https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#appendix-a-full-conventions-text
2024-06-12Use payload_as_str instead of two downcasts.Mara Bos-4/+1
2024-06-11Bump deprecation of std's PanicInfo alias to 1.82.0.Mara Bos-1/+1
2024-06-11Add PanicHookInfo::payload_as_str().Mara Bos-0/+39
2024-06-11Add note on panic payload type.Mara Bos-0/+7
2024-06-11Downcast panic payload to String too in example.Mara Bos-0/+2
2024-06-11Move deprecation of std::panic::PanicInfo to 1.80.0.Mara Bos-1/+1
2024-06-11Rename std::panic::PanicInfo to PanicHookInfo.Mara Bos-13/+18
2024-06-11Mark some PanicInfo methods as #[inline] for consistency.Mara Bos-0/+3
2024-06-11Remove std::panic::PanicInfo::internal_constructor+set_payload.Mara Bos-12/+3
We can just set the payload immediately in the constructor, and the constructor does not need to be public.
2024-06-11Fix doc link.Mara Bos-3/+2
2024-06-11Document difference between core and std's PanicInfo.Mara Bos-2/+9
2024-06-11Split core's PanicInfo and std's PanicInfo.Mara Bos-1/+152
2024-03-31catch_panic: warn about panicking payload dropRalf Jung-0/+3
2024-02-28Implement unwind safety for CondvarJonathan Johnson-1/+5
Closes #118009 This commit adds unwind safety to Condvar. Previously, only select platforms implemented unwind safety through auto traits. Known by this committer: Linux was unwind safe, but Mac and Windows are not before this change.
2024-01-31Store SHOULD_CAPTURE as AtomicU8GnomedDev-6/+6
2023-12-09merge core_panic feature into panic_internalsRalf Jung-1/+1
2023-05-15Shorten lifetime of even more panic temporariesDavid Tolnay-2/+2
2023-05-14Shorten lifetime of panic temporaries in panic_fmt caseDavid Tolnay-1/+3
2023-03-17reviewGus Caplan-1/+1
2023-03-17move default backtrace setting to sysGus Caplan-2/+1
2022-12-28Clarify catch_unwind docs about panic hooksAlbert Larsan-0/+3
Makes it clear from catch_unwind docs that the panic hook will be called before the panic is caught.
2022-09-14Adding backtrace off option for fuchsia targetsAndrew Pollack-17/+16
2022-07-08Support unstable moves via stable in unstable itemsJane Lusby-1/+1
2022-02-02Configure panic hook backtrace behaviorMark Rousskov-0/+114
2022-01-07Implement panic::update_hookBadel2-0/+3
2021-10-19Deduplicate panic_fmtGary Guo-1/+1
std's begin_panic_fmt and core's panic_fmt are duplicates. Merge them to declutter code and remove a lang item.
2021-09-15Allow `panic!("{}", computed_str)` in const fn.Gary Guo-1/+5
2021-07-30Move UnwindSafe, RefUnwindSafe, AssertUnwindSafe to coreDavid Tolnay-309/+4
2021-07-30Auto merge of #87445 - amalik18:issue-83584-fix, r=kennytmbors-2/+2
Fix may not to appropriate might not or must not I went through and changed occurrences of `may not` to be more explicit with `might not` and `must not`.
2021-07-29Fix may not to appropriate might not or must notAli Malik-2/+2
2021-07-28Add new const_format_args!() macro and use it in panics.Mara Bos-2/+2
2021-06-29Use diagnostic items to check for Send, UnwindSafe and RefUnwindSafe traitsRoxane Fruytier-2/+2
2021-06-29Remove lang items Send, UnwindSafe and RefUnwindSafeRoxane Fruytier-2/+2
2021-06-28Update to new bootstrap compilerMark Rousskov-2/+2
2021-05-27Add #[track_caller] to panic_anyAlex Veber-0/+1