File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -419,15 +419,15 @@ fn rust_oom(layout: Layout) -> ! {
419419/// rather than directly invoking [`panic!`] or similar.
420420///
421421/// This function triggers a panic with a special payload of [`AllocErrorPanicPayload`] that holds
422- /// the [`Layout`] passed into this function .
422+ /// information about the allocation that failed .
423423///
424424/// There are 2 ways in which such panics can be handled:
425425///
426426/// * If the binary links against `std` (typically the case), then
427- /// the payload is available through [`PanicInfo::payload`][std_payload]. By default, panics caused by this
428- /// function will always abort the process instead of unwinding. This can be overridden by
429- /// compiling the program with the `-Z oom=unwind` option, in which case the payload is captured
430- /// and can be recovered through the [`catch_unwind`] function.
427+ /// the payload is available through [`PanicInfo::payload`][std_payload].
428+ /// By default, panics caused by thisfunction will always abort the process instead of unwinding.
429+ /// This can be overridden by compiling the program with the `-Z oom=unwind` option, in which case
430+ /// the payload is captured and can be recovered through the [`catch_unwind`] function.
431431///
432432/// * If the binary does not link against `std` (all of its crates are marked
433433/// [`#![no_std]`][no_std]), then [the panic handler] is called. The payload is available through
Original file line number Diff line number Diff line change 136136 LL| |
137137 LL| |impl std::fmt::Debug for Foo {
138138 LL| | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
139- LL| 7 | write!(f, "try and succeed")?;
139+ LL| 9 | write!(f, "try and succeed")?;
140140 ^0
141- LL| 7 | Ok(())
142- LL| 7 | }
141+ LL| 9 | Ok(())
142+ LL| 9 | }
143143 LL| |}
144144 LL| |
145145 LL| |static mut DEBUG_LEVEL_ENABLED: bool = false;
You can’t perform that action at this time.
0 commit comments