Skip to content

Commit 42c0fc7

Browse files
committed
Adjust expected result for coverage test
1 parent d89ecfb commit 42c0fc7

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

library/alloc/src/alloc.rs

+5-5
Original file line numberDiff line numberDiff 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

tests/run-coverage/issue-84561.coverage

+3-3
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@
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;

0 commit comments

Comments
 (0)