Skip to content

Commit

Permalink
Normalize out generic arguments in backtrace-api stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron1011 committed Sep 28, 2020
1 parent b1837d0 commit 7fba3c2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
1 change: 1 addition & 0 deletions tests/run-pass/backtrace-api.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// normalize-stderr-test ".*rustlib" -> "RUSTLIB"
// normalize-stderr-test "RUSTLIB/(.*):\d+:\d+ "-> "RUSTLIB/$1:LL:COL "
// normalize-stderr-test "::<.*>" -> ""

extern "Rust" {
fn miri_get_backtrace(flags: u64) -> Box<[*mut ()]>;
Expand Down
22 changes: 11 additions & 11 deletions tests/run-pass/backtrace-api.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
$DIR/backtrace-api.rs:20:59 (func_c)
$DIR/backtrace-api.rs:19:53 (func_b::<u8>)
$DIR/backtrace-api.rs:18:50 (func_a)
$DIR/backtrace-api.rs:24:18 (main)
$DIR/backtrace-api.rs:21:59 (func_c)
$DIR/backtrace-api.rs:20:53 (func_b)
$DIR/backtrace-api.rs:19:50 (func_a)
$DIR/backtrace-api.rs:25:18 (main)
RUSTLIB/src/rust/library/core/src/ops/function.rs:LL:COL (<fn() as std::ops::FnOnce<()>>::call_once - shim(fn()))
RUSTLIB/src/rust/library/std/src/sys_common/backtrace.rs:LL:COL (std::sys_common::backtrace::__rust_begin_short_backtrace::<fn(), ()>)
RUSTLIB/src/rust/library/std/src/rt.rs:LL:COL (std::rt::lang_start::<()>::{{closure}}#0)
RUSTLIB/src/rust/library/core/src/ops/function.rs:LL:COL (std::ops::function::impls::<impl std::ops::FnOnce<()> for &dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe>::call_once)
RUSTLIB/src/rust/library/std/src/panicking.rs:LL:COL (std::panicking::r#try::do_call::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32>)
RUSTLIB/src/rust/library/std/src/panicking.rs:LL:COL (std::panicking::r#try::<i32, &dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe>)
RUSTLIB/src/rust/library/std/src/panic.rs:LL:COL (std::panic::catch_unwind::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32>)
RUSTLIB/src/rust/library/std/src/sys_common/backtrace.rs:LL:COL (std::sys_common::backtrace::__rust_begin_short_backtrace)
RUSTLIB/src/rust/library/std/src/rt.rs:LL:COL (std::rt::lang_start::{closure#0})
RUSTLIB/src/rust/library/core/src/ops/function.rs:LL:COL (std::ops::function::impls::call_once)
RUSTLIB/src/rust/library/std/src/panicking.rs:LL:COL (std::panicking::r#try::do_call)
RUSTLIB/src/rust/library/std/src/panicking.rs:LL:COL (std::panicking::r#try)
RUSTLIB/src/rust/library/std/src/panic.rs:LL:COL (std::panic::catch_unwind)
RUSTLIB/src/rust/library/std/src/rt.rs:LL:COL (std::rt::lang_start_internal)
RUSTLIB/src/rust/library/std/src/rt.rs:LL:COL (std::rt::lang_start::<()>)
RUSTLIB/src/rust/library/std/src/rt.rs:LL:COL (std::rt::lang_start)
8 changes: 4 additions & 4 deletions tests/run-pass/backtrace-api.stdout
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$DIR/backtrace-api.rs:20:59 (func_c)
$DIR/backtrace-api.rs:19:53 (func_b::<u8>)
$DIR/backtrace-api.rs:18:50 (func_a)
$DIR/backtrace-api.rs:24:18 (main)
$DIR/backtrace-api.rs:21:59 (func_c)
$DIR/backtrace-api.rs:20:53 (func_b::<u8>)
$DIR/backtrace-api.rs:19:50 (func_a)
$DIR/backtrace-api.rs:25:18 (main)

0 comments on commit 7fba3c2

Please sign in to comment.