diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2019-09-25 06:43:49 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2019-09-25 06:43:49 -0700 |
| commit | 1d06058a77beffb6347c77b51e12889b7bd9fc76 (patch) | |
| tree | 2eb3a1feff849ef282d27852d962a81afb7559cd /src/libstd/thread/mod.rs | |
| parent | 6ef275e6c3cb1384ec78128eceeb4963ff788dca (diff) | |
| download | rust-1d06058a77beffb6347c77b51e12889b7bd9fc76.tar.gz rust-1d06058a77beffb6347c77b51e12889b7bd9fc76.zip | |
std: Reduce checks for `feature = "backtrace"`
This is a stylistic change to libstd to reduce the number of checks of `feature = "backtrace"` now that we unconditionally depend on the `backtrace` crate and rely on it having an empty implementation. otherwise.
Diffstat (limited to 'src/libstd/thread/mod.rs')
| -rw-r--r-- | src/libstd/thread/mod.rs | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index 764041d2f42..0ffa6ace2e4 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -465,12 +465,9 @@ impl Builder { } thread_info::set(imp::guard::current(), their_thread); - #[cfg(feature = "backtrace")] let try_result = panic::catch_unwind(panic::AssertUnwindSafe(|| { crate::sys_common::backtrace::__rust_begin_short_backtrace(f) })); - #[cfg(not(feature = "backtrace"))] - let try_result = panic::catch_unwind(panic::AssertUnwindSafe(f)); *their_packet.get() = Some(try_result); }; |
