File tree 2 files changed +8
-8
lines changed
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) -> ! {
419
419
/// rather than directly invoking [`panic!`] or similar.
420
420
///
421
421
/// 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 .
423
423
///
424
424
/// There are 2 ways in which such panics can be handled:
425
425
///
426
426
/// * 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.
431
431
///
432
432
/// * If the binary does not link against `std` (all of its crates are marked
433
433
/// [`#![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 136
136
LL| |
137
137
LL| |impl std::fmt::Debug for Foo {
138
138
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")?;
140
140
^0
141
- LL| 7 | Ok(())
142
- LL| 7 | }
141
+ LL| 9 | Ok(())
142
+ LL| 9 | }
143
143
LL| |}
144
144
LL| |
145
145
LL| |static mut DEBUG_LEVEL_ENABLED: bool = false;
You can’t perform that action at this time.
0 commit comments