mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-21 22:34:05 +00:00
Use Backtrace::force_capture instead of Backtrace::capture in rustc_log
This commit is contained in:
parent
1d0e4afd4c
commit
8f11f48a02
@ -159,7 +159,9 @@ where
|
||||
if !target.contains(&self.backtrace_target) {
|
||||
return Ok(());
|
||||
}
|
||||
let backtrace = std::backtrace::Backtrace::capture();
|
||||
// Use Backtrace::force_capture because we don't want to depend on the
|
||||
// RUST_BACKTRACE environment variable being set.
|
||||
let backtrace = std::backtrace::Backtrace::force_capture();
|
||||
writeln!(writer, "stack backtrace: \n{backtrace:?}")
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user