Skip to content

Commit

Permalink
Rollup merge of rust-lang#86114 - JDuchniewicz:feat/panic-frame-fmt, …
Browse files Browse the repository at this point in the history
…r=yaahc

Reopen rust-lang#79692 (Format symbols under shared frames)

Reopening rust-lang#79692.
  • Loading branch information
JohnTitor authored Jun 21, 2021
2 parents 0f6b73b + 8423a19 commit b79239c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions library/std/src/backtrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,12 +399,11 @@ impl fmt::Display for Backtrace {
let mut f = backtrace_rs::BacktraceFmt::new(fmt, style, &mut print_path);
f.add_context()?;
for frame in frames {
let mut f = f.frame();
if frame.symbols.is_empty() {
f.print_raw(frame.frame.ip(), None, None, None)?;
f.frame().print_raw(frame.frame.ip(), None, None, None)?;
} else {
for symbol in frame.symbols.iter() {
f.print_raw_with_column(
f.frame().print_raw_with_column(
frame.frame.ip(),
symbol.name.as_ref().map(|b| backtrace_rs::SymbolName::new(b)),
symbol.filename.as_ref().map(|b| match b {
Expand Down

0 comments on commit b79239c

Please sign in to comment.