Skip to content

Commit

Permalink
Rollup merge of rust-lang#69042 - yaahc:backtrace-header, r=dtolnay
Browse files Browse the repository at this point in the history
Remove backtrace header text

Fixes point 3 from rust-lang#65280

related to rust-lang#53487

This should probably be double checked by someone who works on fuschia because theres some extra fuschia specific output in `add_context` that is also removed by this change.
  • Loading branch information
Dylan-DPC authored Feb 12, 2020
2 parents 42f371c + 090a157 commit 6b40f59
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2"

[[package]]
name = "backtrace"
version = "0.3.40"
version = "0.3.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "924c76597f0d9ca25d762c25a4d369d51267536465dc5064bdf0eb073ed477ea"
checksum = "e4036b9bf40f3cf16aba72a3d65e8a520fc4bafcdc7079aea8f848c58c5b5536"
dependencies = [
"backtrace-sys",
"cfg-if",
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ hashbrown = { version = "0.6.2", default-features = false, features = ['rustc-de

[dependencies.backtrace_rs]
package = "backtrace"
version = "0.3.37"
version = "0.3.44"
default-features = false # without the libstd `backtrace` feature, stub out everything
features = [ "rustc-dep-of-std" ] # enable build support for integrating into libstd

Expand Down
1 change: 1 addition & 0 deletions src/libstd/sys_common/backtrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ unsafe fn _print_fmt(fmt: &mut fmt::Formatter<'_>, print_fmt: PrintFmt) -> fmt::
let mut print_path = move |fmt: &mut fmt::Formatter<'_>, bows: BytesOrWideString<'_>| {
output_filename(fmt, bows, print_fmt, cwd.as_ref())
};
write!(fmt, "stack backtrace:\n")?;
let mut bt_fmt = BacktraceFmt::new(fmt, print_fmt, &mut print_path);
bt_fmt.add_context()?;
let mut idx = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/std-backtrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ use std::str;
fn main() {
let args: Vec<String> = env::args().collect();
if args.len() >= 2 && args[1] == "force" {
println!("{}", std::backtrace::Backtrace::force_capture());
println!("stack backtrace:\n{}", std::backtrace::Backtrace::force_capture());
} else if args.len() >= 2 {
println!("{}", std::backtrace::Backtrace::capture());
println!("stack backtrace:\n{}", std::backtrace::Backtrace::capture());
} else {
runtest(&args[0]);
println!("test ok");
Expand Down

0 comments on commit 6b40f59

Please sign in to comment.