]> git.lizzy.rs Git - rust.git/commitdiff
rustup; make panic output less dependent on stdlib internals
authorRalf Jung <post@ralfj.de>
Sun, 25 Oct 2020 09:00:50 +0000 (10:00 +0100)
committerRalf Jung <post@ralfj.de>
Sun, 25 Oct 2020 09:00:50 +0000 (10:00 +0100)
rust-version
tests/run-pass/backtrace-std.rs
tests/run-pass/backtrace-std.stderr
tests/run-pass/panic/catch_panic.stderr
tests/run-pass/panic/panic1.rs
tests/run-pass/panic/panic1.stderr

index d661d821503bca102e32b62c9cf9c9266483a9a8..44e9a77940d6e7842e6134c694f48d14f233e6f7 100644 (file)
@@ -1 +1 @@
-8f0fa9d51ff4ad2c0869e660856cd327e79915e9
+17cc9b6256c95c31944591aec683884fead4e3b6
index 579b4f32e7ccf945afdc3dd746ce3e2c79f656cd..fb596b1d2020c155cbbe7662cba53401cd9b7aab 100644 (file)
@@ -1,5 +1,5 @@
-// normalize-stderr-test ".*/(rust|checkout)/library/" -> "RUSTLIB/"
-// normalize-stderr-test "RUSTLIB/(.*):\d+:\d+ "-> "RUSTLIB/$1:LL:COL "
+// normalize-stderr-test "at .*/(rust|checkout)/library/" -> "at RUSTLIB/"
+// normalize-stderr-test "RUSTLIB/(.*):\d+"-> "RUSTLIB/$1:LL"
 // normalize-stderr-test "::<.*>" -> ""
 // compile-flags: -Zmiri-disable-isolation
 
index d14735c0405f11b2fa78e8231fa79a28b7f21ab1..45c46acc331c914f54cabc56507e6db5f17c6860 100644 (file)
@@ -9,20 +9,20 @@
    4: main
              at $DIR/backtrace-std.rs:21
    5: <fn() as std::ops::FnOnce<()>>::call_once - shim(fn())
-RUSTLIB/core/src/ops/function.rs:227
+             at RUSTLIB/core/src/ops/function.rs:LL
    6: std::sys_common::backtrace::__rust_begin_short_backtrace
-RUSTLIB/std/src/sys_common/backtrace.rs:125
+             at RUSTLIB/std/src/sys_common/backtrace.rs:LL
    7: std::rt::lang_start::{closure#0}
-RUSTLIB/std/src/rt.rs:66
+             at RUSTLIB/std/src/rt.rs:LL
    8: std::ops::function::impls::call_once
-RUSTLIB/core/src/ops/function.rs:259
+             at RUSTLIB/core/src/ops/function.rs:LL
    9: std::panicking::r#try::do_call
-RUSTLIB/std/src/panicking.rs:381
+             at RUSTLIB/std/src/panicking.rs:LL
   10: std::panicking::r#try
-RUSTLIB/std/src/panicking.rs:345
+             at RUSTLIB/std/src/panicking.rs:LL
   11: std::panic::catch_unwind
-RUSTLIB/std/src/panic.rs:382
+             at RUSTLIB/std/src/panic.rs:LL
   12: std::rt::lang_start_internal
-RUSTLIB/std/src/rt.rs:51
+             at RUSTLIB/std/src/rt.rs:LL
   13: std::rt::lang_start
-RUSTLIB/std/src/rt.rs:65
+             at RUSTLIB/std/src/rt.rs:LL
index 30c7767b5642b6c48cb09971a460757360bd0c83..c4c04fece901c4a4c8c5ced4311eacc13cfc5e6a 100644 (file)
@@ -8,7 +8,7 @@ Caught panic message (String): Hello from panic: 2
 thread 'main' panicked at 'Box<Any>', $DIR/catch_panic.rs:LL:27
 Failed to get caught panic message.
 thread 'main' panicked at 'Hello from panic: core', $DIR/catch_panic.rs:LL:27
-Caught panic message (String): Hello from panic: core
+Caught panic message (&str): Hello from panic: core
 thread 'main' panicked at 'Hello from panic: 5', $DIR/catch_panic.rs:LL:26
 Caught panic message (String): Hello from panic: 5
 thread 'main' panicked at 'Hello from panic: 6', $DIR/catch_panic.rs:LL:26
@@ -16,13 +16,13 @@ Caught panic message (String): Hello from panic: 6
 thread 'main' panicked at 'index out of bounds: the len is 3 but the index is 4', $DIR/catch_panic.rs:LL:33
 Caught panic message (String): index out of bounds: the len is 3 but the index is 4
 thread 'main' panicked at 'attempt to divide by zero', $DIR/catch_panic.rs:LL:33
-Caught panic message (String): attempt to divide by zero
+Caught panic message (&str): attempt to divide by zero
 thread 'main' panicked at 'align_offset: align is not a power-of-two', $LOC
-Caught panic message (String): align_offset: align is not a power-of-two
+Caught panic message (&str): align_offset: align is not a power-of-two
 thread 'main' panicked at 'assertion failed: false', $DIR/catch_panic.rs:LL:29
 Caught panic message (&str): assertion failed: false
 thread 'main' panicked at 'assertion failed: false', $DIR/catch_panic.rs:LL:29
 Caught panic message (&str): assertion failed: false
 thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', $LOC
-Caught panic message (String): called `Option::unwrap()` on a `None` value
+Caught panic message (&str): called `Option::unwrap()` on a `None` value
 Success!
index 4500c916ad6a5aaf7801bc5cdc624d0902dac9f8..08ac3a072852283a07ff1fbd226372aab10bc17e 100644 (file)
@@ -1,9 +1,9 @@
 // rustc-env: RUST_BACKTRACE=1
 // compile-flags: -Zmiri-disable-isolation
-// normalize-stderr-test ".*/(rust|checkout)/library/" -> "RUSTLIB/"
-// normalize-stderr-test "RUSTLIB/(.*):\d+:\d+ "-> "RUSTLIB/$1:LL:COL "
+// normalize-stderr-test "at .*/(rust|checkout)/library/.*" -> "at RUSTLIB/$$FILE:LL:COL"
 // normalize-stderr-test "::<.*>" -> ""
 
+
 fn main() {
     std::panic!("panicking from libstd");
 }
index e06ec1b9ce32d12e145eab94f5c6aa9765df7519..e0f1aa5dad70bb42199aa21a6e9742e1a1c99881 100644 (file)
@@ -1,23 +1,23 @@
 thread 'main' panicked at 'panicking from libstd', $DIR/panic1.rs:8:5
 stack backtrace:
    0: std::rt::begin_panic
-RUSTLIB/std/src/panicking.rs:505:12
+             at RUSTLIB/$FILE:LL:COL
    1: main
              at $DIR/panic1.rs:8:5
    2: <fn() as std::ops::FnOnce<()>>::call_once - shim(fn())
-RUSTLIB/core/src/ops/function.rs:227:5
+             at RUSTLIB/$FILE:LL:COL
    3: std::rt::lang_start::{closure#0}
-RUSTLIB/std/src/rt.rs:66:18
+             at RUSTLIB/$FILE:LL:COL
    4: std::ops::function::impls::call_once
-RUSTLIB/core/src/ops/function.rs:259:13
+             at RUSTLIB/$FILE:LL:COL
    5: std::panicking::r#try::do_call
-RUSTLIB/std/src/panicking.rs:381:40
+             at RUSTLIB/$FILE:LL:COL
    6: std::panicking::r#try
-RUSTLIB/std/src/panicking.rs:345:19
+             at RUSTLIB/$FILE:LL:COL
    7: std::panic::catch_unwind
-RUSTLIB/std/src/panic.rs:382:14
+             at RUSTLIB/$FILE:LL:COL
    8: std::rt::lang_start_internal
-RUSTLIB/std/src/rt.rs:51:25
+             at RUSTLIB/$FILE:LL:COL
    9: std::rt::lang_start
-RUSTLIB/std/src/rt.rs:65:5
+             at RUSTLIB/$FILE:LL:COL
 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.