Skip to content

Commit 4a7bd52

Browse files
committed
Auto merge of rust-lang#134878 - Zalathar:rollup-ebqmxw7, r=Zalathar
Rollup of 4 pull requests Successful merges: - rust-lang#122565 (Try to write the panic message with a single `write_all` call) - rust-lang#133460 (Use `check-run-results` for `run-fail` test stderr) - rust-lang#134627 (Avoid ICE in borrowck) - rust-lang#134799 (nits: Cleanups in `librustdoc::clean`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 480eec0 + 68d06b4 commit 4a7bd52

File tree

451 files changed

+1083
-254
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

451 files changed

+1083
-254
lines changed

Diff for: compiler/rustc_borrowck/src/region_infer/mod.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -1950,8 +1950,14 @@ impl<'tcx> RegionInferenceContext<'tcx> {
19501950
target_test: impl Fn(RegionVid) -> bool,
19511951
) -> (BlameConstraint<'tcx>, Vec<ExtraConstraintInfo>) {
19521952
// Find all paths
1953-
let (path, target_region) =
1954-
self.find_constraint_paths_between_regions(from_region, target_test).unwrap();
1953+
let (path, target_region) = self
1954+
.find_constraint_paths_between_regions(from_region, target_test)
1955+
.or_else(|| {
1956+
self.find_constraint_paths_between_regions(from_region, |r| {
1957+
self.cannot_name_placeholder(from_region, r)
1958+
})
1959+
})
1960+
.unwrap();
19551961
debug!(
19561962
"path={:#?}",
19571963
path.iter()

Diff for: library/std/src/panicking.rs

+17-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,23 @@ fn default_hook(info: &PanicHookInfo<'_>) {
266266
// Use a lock to prevent mixed output in multithreading context.
267267
// Some platforms also require it when printing a backtrace, like `SymFromAddr` on Windows.
268268
let mut lock = backtrace::lock();
269-
let _ = writeln!(err, "thread '{name}' panicked at {location}:\n{msg}");
269+
// Try to write the panic message to a buffer first to prevent other concurrent outputs
270+
// interleaving with it.
271+
let mut buffer = [0u8; 512];
272+
let mut cursor = crate::io::Cursor::new(&mut buffer[..]);
273+
274+
let write_msg = |dst: &mut dyn crate::io::Write| {
275+
// We add a newline to ensure the panic message appears at the start of a line.
276+
writeln!(dst, "\nthread '{name}' panicked at {location}:\n{msg}")
277+
};
278+
279+
if write_msg(&mut cursor).is_ok() {
280+
let pos = cursor.position() as usize;
281+
let _ = err.write_all(&buffer[0..pos]);
282+
} else {
283+
// The message did not fit into the buffer, write it directly instead.
284+
let _ = write_msg(err);
285+
};
270286

271287
static FIRST_PANIC: AtomicBool = AtomicBool::new(true);
272288

Diff for: src/librustdoc/clean/mod.rs

+10-12
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ fn clean_poly_trait_ref_with_constraints<'tcx>(
268268
)
269269
}
270270

271-
fn clean_lifetime(lifetime: &hir::Lifetime, cx: &mut DocContext<'_>) -> Lifetime {
271+
fn clean_lifetime(lifetime: &hir::Lifetime, cx: &DocContext<'_>) -> Lifetime {
272272
if let Some(
273273
rbv::ResolvedArg::EarlyBound(did)
274274
| rbv::ResolvedArg::LateBound(_, _, did)
@@ -362,9 +362,9 @@ pub(crate) fn clean_predicate<'tcx>(
362362
let bound_predicate = predicate.kind();
363363
match bound_predicate.skip_binder() {
364364
ty::ClauseKind::Trait(pred) => clean_poly_trait_predicate(bound_predicate.rebind(pred), cx),
365-
ty::ClauseKind::RegionOutlives(pred) => clean_region_outlives_predicate(pred),
365+
ty::ClauseKind::RegionOutlives(pred) => Some(clean_region_outlives_predicate(pred)),
366366
ty::ClauseKind::TypeOutlives(pred) => {
367-
clean_type_outlives_predicate(bound_predicate.rebind(pred), cx)
367+
Some(clean_type_outlives_predicate(bound_predicate.rebind(pred), cx))
368368
}
369369
ty::ClauseKind::Projection(pred) => {
370370
Some(clean_projection_predicate(bound_predicate.rebind(pred), cx))
@@ -396,32 +396,30 @@ fn clean_poly_trait_predicate<'tcx>(
396396
})
397397
}
398398

399-
fn clean_region_outlives_predicate(
400-
pred: ty::RegionOutlivesPredicate<'_>,
401-
) -> Option<WherePredicate> {
399+
fn clean_region_outlives_predicate(pred: ty::RegionOutlivesPredicate<'_>) -> WherePredicate {
402400
let ty::OutlivesPredicate(a, b) = pred;
403401

404-
Some(WherePredicate::RegionPredicate {
402+
WherePredicate::RegionPredicate {
405403
lifetime: clean_middle_region(a).expect("failed to clean lifetime"),
406404
bounds: vec![GenericBound::Outlives(
407405
clean_middle_region(b).expect("failed to clean bounds"),
408406
)],
409-
})
407+
}
410408
}
411409

412410
fn clean_type_outlives_predicate<'tcx>(
413411
pred: ty::Binder<'tcx, ty::TypeOutlivesPredicate<'tcx>>,
414412
cx: &mut DocContext<'tcx>,
415-
) -> Option<WherePredicate> {
413+
) -> WherePredicate {
416414
let ty::OutlivesPredicate(ty, lt) = pred.skip_binder();
417415

418-
Some(WherePredicate::BoundPredicate {
416+
WherePredicate::BoundPredicate {
419417
ty: clean_middle_ty(pred.rebind(ty), cx, None, None),
420418
bounds: vec![GenericBound::Outlives(
421419
clean_middle_region(lt).expect("failed to clean lifetimes"),
422420
)],
423421
bound_params: Vec::new(),
424-
})
422+
}
425423
}
426424

427425
fn clean_middle_term<'tcx>(
@@ -1860,7 +1858,7 @@ pub(crate) fn clean_ty<'tcx>(ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> T
18601858

18611859
/// Returns `None` if the type could not be normalized
18621860
fn normalize<'tcx>(
1863-
cx: &mut DocContext<'tcx>,
1861+
cx: &DocContext<'tcx>,
18641862
ty: ty::Binder<'tcx, Ty<'tcx>>,
18651863
) -> Option<ty::Binder<'tcx, Ty<'tcx>>> {
18661864
// HACK: low-churn fix for #79459 while we wait for a trait normalization fix

Diff for: src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind1.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at tests/fail/function_calls/exported_symbol_bad_unwind1.rs:LL:CC:
23
explicit panic
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Diff for: src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
12
thread 'main' panicked at tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC:
23
explicit panic
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
45
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
6+
57
thread 'main' panicked at RUSTLIB/core/src/panicking.rs:LL:CC:
68
panic in a function that cannot unwind
79
stack backtrace:

Diff for: src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
12
thread 'main' panicked at tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC:
23
explicit panic
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
45
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
6+
57
thread 'main' panicked at RUSTLIB/core/src/panicking.rs:LL:CC:
68
panic in a function that cannot unwind
79
stack backtrace:

Diff for: src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.extern_block.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC:
23
explicit panic
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Diff for: src/tools/miri/tests/fail/function_calls/return_pointer_on_unwind.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at tests/fail/function_calls/return_pointer_on_unwind.rs:LL:CC:
23
explicit panic
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Diff for: src/tools/miri/tests/fail/intrinsics/uninit_uninhabited_type.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at RUSTLIB/core/src/panicking.rs:LL:CC:
23
aborted execution: attempted to instantiate uninhabited type `!`
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Diff for: src/tools/miri/tests/fail/intrinsics/zero_fn_ptr.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at RUSTLIB/core/src/panicking.rs:LL:CC:
23
aborted execution: attempted to zero-initialize type `fn()`, which is invalid
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Diff for: src/tools/miri/tests/fail/panic/abort_unwind.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
12
thread 'main' panicked at tests/fail/panic/abort_unwind.rs:LL:CC:
23
PANIC!!!
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
45
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
6+
57
thread 'main' panicked at RUSTLIB/core/src/panicking.rs:LL:CC:
68
panic in a function that cannot unwind
79
stack backtrace:

Diff for: src/tools/miri/tests/fail/panic/bad_unwind.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at tests/fail/panic/bad_unwind.rs:LL:CC:
23
explicit panic
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Diff for: src/tools/miri/tests/fail/panic/double_panic.stderr

+3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
12
thread 'main' panicked at tests/fail/panic/double_panic.rs:LL:CC:
23
first
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
45
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
6+
57
thread 'main' panicked at tests/fail/panic/double_panic.rs:LL:CC:
68
second
79
stack backtrace:
10+
811
thread 'main' panicked at RUSTLIB/core/src/panicking.rs:LL:CC:
912
panic in a destructor during cleanup
1013
thread caused non-unwinding panic. aborting.

Diff for: src/tools/miri/tests/fail/panic/panic_abort1.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at tests/fail/panic/panic_abort1.rs:LL:CC:
23
panicking from libstd
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Diff for: src/tools/miri/tests/fail/panic/panic_abort2.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at tests/fail/panic/panic_abort2.rs:LL:CC:
23
42-panicking from libstd
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Diff for: src/tools/miri/tests/fail/panic/panic_abort3.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at tests/fail/panic/panic_abort3.rs:LL:CC:
23
panicking from libcore
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Diff for: src/tools/miri/tests/fail/panic/panic_abort4.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at tests/fail/panic/panic_abort4.rs:LL:CC:
23
42-panicking from libcore
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Diff for: src/tools/miri/tests/fail/panic/tls_macro_const_drop_panic.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread $NAME panicked at tests/fail/panic/tls_macro_const_drop_panic.rs:LL:CC:
23
ow
34
fatal runtime error: thread local panicked on drop

Diff for: src/tools/miri/tests/fail/panic/tls_macro_drop_panic.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread $NAME panicked at tests/fail/panic/tls_macro_drop_panic.rs:LL:CC:
23
ow
34
fatal runtime error: thread local panicked on drop

Diff for: src/tools/miri/tests/fail/terminate-terminator.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
warning: You have explicitly enabled MIR optimizations, overriding Miri's default which is to completely disable them. Any optimizations may hide UB that Miri would otherwise detect, and it is not necessarily possible to predict what kind of UB will be missed. If you are enabling optimizations to make Miri run faster, we advise using cfg(miri) to shrink your workload instead. The performance benefit of enabling MIR optimizations is usually marginal at best.
22

3+
34
thread 'main' panicked at tests/fail/terminate-terminator.rs:LL:CC:
45
explicit panic
56
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
67
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
8+
79
thread 'main' panicked at RUSTLIB/core/src/panicking.rs:LL:CC:
810
panic in a function that cannot unwind
911
stack backtrace:

Diff for: src/tools/miri/tests/fail/unwind-action-terminate.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
12
thread 'main' panicked at tests/fail/unwind-action-terminate.rs:LL:CC:
23
explicit panic
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
45
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
6+
57
thread 'main' panicked at RUSTLIB/core/src/panicking.rs:LL:CC:
68
panic in a function that cannot unwind
79
stack backtrace:

Diff for: src/tools/miri/tests/panic/alloc_error_handler_hook.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at tests/panic/alloc_error_handler_hook.rs:LL:CC:
23
alloc error hook called
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Diff for: src/tools/miri/tests/panic/alloc_error_handler_panic.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at RUSTLIB/std/src/alloc.rs:LL:CC:
23
memory allocation of 4 bytes failed
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Diff for: src/tools/miri/tests/panic/div-by-zero-2.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at tests/panic/div-by-zero-2.rs:LL:CC:
23
attempt to divide by zero
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
12
thread 'main' panicked at tests/panic/function_calls/exported_symbol_good_unwind.rs:LL:CC:
23
explicit panic
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
45
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
6+
57
thread 'main' panicked at tests/panic/function_calls/exported_symbol_good_unwind.rs:LL:CC:
68
explicit panic
9+
710
thread 'main' panicked at tests/panic/function_calls/exported_symbol_good_unwind.rs:LL:CC:
811
explicit panic

Diff for: src/tools/miri/tests/panic/mir-validation.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'rustc' panicked at compiler/rustc_mir_transform/src/validate.rs:LL:CC:
23
broken MIR in Item(DefId) (after phase change to runtime-optimized) at bb0[1]:
34
place (*(_2.0: *mut i32)) has deref as a later projection (it is only permitted as the first projection)

Diff for: src/tools/miri/tests/panic/oob_subslice.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at tests/panic/oob_subslice.rs:LL:CC:
23
range end index 5 out of range for slice of length 4
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Diff for: src/tools/miri/tests/panic/overflowing-lsh-neg.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at tests/panic/overflowing-lsh-neg.rs:LL:CC:
23
attempt to shift left with overflow
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Diff for: src/tools/miri/tests/panic/overflowing-rsh-1.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at tests/panic/overflowing-rsh-1.rs:LL:CC:
23
attempt to shift right with overflow
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Diff for: src/tools/miri/tests/panic/overflowing-rsh-2.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at tests/panic/overflowing-rsh-2.rs:LL:CC:
23
attempt to shift right with overflow
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Diff for: src/tools/miri/tests/panic/panic1.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at tests/panic/panic1.rs:LL:CC:
23
panicking from libstd
34
stack backtrace:

Diff for: src/tools/miri/tests/panic/panic2.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at tests/panic/panic2.rs:LL:CC:
23
42-panicking from libstd
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Diff for: src/tools/miri/tests/panic/panic3.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at tests/panic/panic3.rs:LL:CC:
23
panicking from libcore
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Diff for: src/tools/miri/tests/panic/panic4.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at tests/panic/panic4.rs:LL:CC:
23
42-panicking from libcore
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Diff for: src/tools/miri/tests/panic/transmute_fat2.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
thread 'main' panicked at tests/panic/transmute_fat2.rs:LL:CC:
23
index out of bounds: the len is 0 but the index is 0
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Diff for: src/tools/miri/tests/pass/panic/catch_panic.stderr

+11
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,46 @@
1+
12
thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC:
23
Hello from std::panic
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
45
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
56
Caught panic message (&str): Hello from std::panic
7+
68
thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC:
79
Hello from std::panic: 1
810
Caught panic message (String): Hello from std::panic: 1
11+
912
thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC:
1013
Hello from std::panic_any: 2
1114
Caught panic message (String): Hello from std::panic_any: 2
15+
1216
thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC:
1317
Box<dyn Any>
1418
Failed to get caught panic message.
19+
1520
thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC:
1621
Hello from core::panic
1722
Caught panic message (&str): Hello from core::panic
23+
1824
thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC:
1925
Hello from core::panic: 5
2026
Caught panic message (String): Hello from core::panic: 5
27+
2128
thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC:
2229
index out of bounds: the len is 3 but the index is 4
2330
Caught panic message (String): index out of bounds: the len is 3 but the index is 4
31+
2432
thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC:
2533
attempt to divide by zero
2634
Caught panic message (&str): attempt to divide by zero
35+
2736
thread 'main' panicked at RUSTLIB/core/src/ptr/const_ptr.rs:LL:CC:
2837
align_offset: align is not a power-of-two
2938
Caught panic message (&str): align_offset: align is not a power-of-two
39+
3040
thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC:
3141
assertion failed: false
3242
Caught panic message (&str): assertion failed: false
43+
3344
thread 'main' panicked at tests/pass/panic/catch_panic.rs:LL:CC:
3445
assertion failed: false
3546
Caught panic message (&str): assertion failed: false

Diff for: src/tools/miri/tests/pass/panic/concurrent-panic.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
Thread 1 starting, will block on mutex
22
Thread 1 reported it has started
3+
34
thread '<unnamed>' panicked at tests/pass/panic/concurrent-panic.rs:LL:CC:
45
panic in thread 2
56
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
67
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
78
Thread 2 blocking on thread 1
89
Thread 2 reported it has started
910
Unlocking mutex
11+
1012
thread '<unnamed>' panicked at tests/pass/panic/concurrent-panic.rs:LL:CC:
1113
panic in thread 1
1214
Thread 1 has exited
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
12
thread 'main' panicked at tests/pass/panic/nested_panic_caught.rs:LL:CC:
23
once
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
45
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
6+
57
thread 'main' panicked at tests/pass/panic/nested_panic_caught.rs:LL:CC:
68
twice
79
stack backtrace:

Diff for: src/tools/miri/tests/pass/panic/thread_panic.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
12
thread '<unnamed>' panicked at tests/pass/panic/thread_panic.rs:LL:CC:
23
Hello!
34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
45
note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
6+
57
thread 'childthread' panicked at tests/pass/panic/thread_panic.rs:LL:CC:
68
Hello, world!

0 commit comments

Comments
 (0)