diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2024-05-21 10:54:36 +0200 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2024-05-21 10:54:36 +0200 |
| commit | 8f11f48a027888b71efbb1769b432606e824e577 (patch) | |
| tree | c12f18dc2a28c3300654c5a9a2d78871cde57fd5 | |
| parent | 1d0e4afd4cac09078e12a232508c3e9f8d42535d (diff) | |
| download | rust-8f11f48a027888b71efbb1769b432606e824e577.tar.gz rust-8f11f48a027888b71efbb1769b432606e824e577.zip | |
Use Backtrace::force_capture instead of Backtrace::capture in rustc_log
| -rw-r--r-- | compiler/rustc_log/src/lib.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_log/src/lib.rs b/compiler/rustc_log/src/lib.rs index 81257f9be88..e11c45b66e6 100644 --- a/compiler/rustc_log/src/lib.rs +++ b/compiler/rustc_log/src/lib.rs @@ -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:?}") } } |
