Skip to content

Commit 88da675

Browse files
committed
Auto merge of #1600 - RalfJung:rustup, r=RalfJung
rustup; make panic output less dependent on stdlib internals
2 parents ef41274 + ddcc4f2 commit 88da675

File tree

6 files changed

+27
-27
lines changed

6 files changed

+27
-27
lines changed

rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8f0fa9d51ff4ad2c0869e660856cd327e79915e9
1+
17cc9b6256c95c31944591aec683884fead4e3b6

tests/run-pass/backtrace-std.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// normalize-stderr-test ".*/(rust|checkout)/library/" -> "RUSTLIB/"
2-
// normalize-stderr-test "RUSTLIB/(.*):\d+:\d+ "-> "RUSTLIB/$1:LL:COL "
1+
// normalize-stderr-test "at .*/(rust|checkout)/library/" -> "at RUSTLIB/"
2+
// normalize-stderr-test "RUSTLIB/(.*):\d+"-> "RUSTLIB/$1:LL"
33
// normalize-stderr-test "::<.*>" -> ""
44
// compile-flags: -Zmiri-disable-isolation
55

tests/run-pass/backtrace-std.stderr

+9-9
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@
99
4: main
1010
at $DIR/backtrace-std.rs:21
1111
5: <fn() as std::ops::FnOnce<()>>::call_once - shim(fn())
12-
RUSTLIB/core/src/ops/function.rs:227
12+
at RUSTLIB/core/src/ops/function.rs:LL
1313
6: std::sys_common::backtrace::__rust_begin_short_backtrace
14-
RUSTLIB/std/src/sys_common/backtrace.rs:125
14+
at RUSTLIB/std/src/sys_common/backtrace.rs:LL
1515
7: std::rt::lang_start::{closure#0}
16-
RUSTLIB/std/src/rt.rs:66
16+
at RUSTLIB/std/src/rt.rs:LL
1717
8: std::ops::function::impls::call_once
18-
RUSTLIB/core/src/ops/function.rs:259
18+
at RUSTLIB/core/src/ops/function.rs:LL
1919
9: std::panicking::r#try::do_call
20-
RUSTLIB/std/src/panicking.rs:381
20+
at RUSTLIB/std/src/panicking.rs:LL
2121
10: std::panicking::r#try
22-
RUSTLIB/std/src/panicking.rs:345
22+
at RUSTLIB/std/src/panicking.rs:LL
2323
11: std::panic::catch_unwind
24-
RUSTLIB/std/src/panic.rs:382
24+
at RUSTLIB/std/src/panic.rs:LL
2525
12: std::rt::lang_start_internal
26-
RUSTLIB/std/src/rt.rs:51
26+
at RUSTLIB/std/src/rt.rs:LL
2727
13: std::rt::lang_start
28-
RUSTLIB/std/src/rt.rs:65
28+
at RUSTLIB/std/src/rt.rs:LL

tests/run-pass/panic/catch_panic.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ Caught panic message (String): Hello from panic: 2
88
thread 'main' panicked at 'Box<Any>', $DIR/catch_panic.rs:LL:27
99
Failed to get caught panic message.
1010
thread 'main' panicked at 'Hello from panic: core', $DIR/catch_panic.rs:LL:27
11-
Caught panic message (String): Hello from panic: core
11+
Caught panic message (&str): Hello from panic: core
1212
thread 'main' panicked at 'Hello from panic: 5', $DIR/catch_panic.rs:LL:26
1313
Caught panic message (String): Hello from panic: 5
1414
thread 'main' panicked at 'Hello from panic: 6', $DIR/catch_panic.rs:LL:26
1515
Caught panic message (String): Hello from panic: 6
1616
thread 'main' panicked at 'index out of bounds: the len is 3 but the index is 4', $DIR/catch_panic.rs:LL:33
1717
Caught panic message (String): index out of bounds: the len is 3 but the index is 4
1818
thread 'main' panicked at 'attempt to divide by zero', $DIR/catch_panic.rs:LL:33
19-
Caught panic message (String): attempt to divide by zero
19+
Caught panic message (&str): attempt to divide by zero
2020
thread 'main' panicked at 'align_offset: align is not a power-of-two', $LOC
21-
Caught panic message (String): align_offset: align is not a power-of-two
21+
Caught panic message (&str): align_offset: align is not a power-of-two
2222
thread 'main' panicked at 'assertion failed: false', $DIR/catch_panic.rs:LL:29
2323
Caught panic message (&str): assertion failed: false
2424
thread 'main' panicked at 'assertion failed: false', $DIR/catch_panic.rs:LL:29
2525
Caught panic message (&str): assertion failed: false
2626
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', $LOC
27-
Caught panic message (String): called `Option::unwrap()` on a `None` value
27+
Caught panic message (&str): called `Option::unwrap()` on a `None` value
2828
Success!

tests/run-pass/panic/panic1.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// rustc-env: RUST_BACKTRACE=1
22
// compile-flags: -Zmiri-disable-isolation
3-
// normalize-stderr-test ".*/(rust|checkout)/library/" -> "RUSTLIB/"
4-
// normalize-stderr-test "RUSTLIB/(.*):\d+:\d+ "-> "RUSTLIB/$1:LL:COL "
3+
// normalize-stderr-test "at .*/(rust|checkout)/library/.*" -> "at RUSTLIB/$$FILE:LL:COL"
54
// normalize-stderr-test "::<.*>" -> ""
65

6+
77
fn main() {
88
std::panic!("panicking from libstd");
99
}

tests/run-pass/panic/panic1.stderr

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
thread 'main' panicked at 'panicking from libstd', $DIR/panic1.rs:8:5
22
stack backtrace:
33
0: std::rt::begin_panic
4-
RUSTLIB/std/src/panicking.rs:505:12
4+
at RUSTLIB/$FILE:LL:COL
55
1: main
66
at $DIR/panic1.rs:8:5
77
2: <fn() as std::ops::FnOnce<()>>::call_once - shim(fn())
8-
RUSTLIB/core/src/ops/function.rs:227:5
8+
at RUSTLIB/$FILE:LL:COL
99
3: std::rt::lang_start::{closure#0}
10-
RUSTLIB/std/src/rt.rs:66:18
10+
at RUSTLIB/$FILE:LL:COL
1111
4: std::ops::function::impls::call_once
12-
RUSTLIB/core/src/ops/function.rs:259:13
12+
at RUSTLIB/$FILE:LL:COL
1313
5: std::panicking::r#try::do_call
14-
RUSTLIB/std/src/panicking.rs:381:40
14+
at RUSTLIB/$FILE:LL:COL
1515
6: std::panicking::r#try
16-
RUSTLIB/std/src/panicking.rs:345:19
16+
at RUSTLIB/$FILE:LL:COL
1717
7: std::panic::catch_unwind
18-
RUSTLIB/std/src/panic.rs:382:14
18+
at RUSTLIB/$FILE:LL:COL
1919
8: std::rt::lang_start_internal
20-
RUSTLIB/std/src/rt.rs:51:25
20+
at RUSTLIB/$FILE:LL:COL
2121
9: std::rt::lang_start
22-
RUSTLIB/std/src/rt.rs:65:5
22+
at RUSTLIB/$FILE:LL:COL
2323
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

0 commit comments

Comments
 (0)