about summary refs log tree commit diff
path: root/src/libstd/thread
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2019-10-05 21:54:51 -0700
committerGitHub <noreply@github.com>2019-10-05 21:54:51 -0700
commitae2a720e92f78e76db5b7c1d6308fcd87d5c5281 (patch)
tree20d99bfa7847537fbe2d967fd32e9e63f6148660 /src/libstd/thread
parent019b5b5f96e89debb0a3f3a71f1454c73966af25 (diff)
parent1d06058a77beffb6347c77b51e12889b7bd9fc76 (diff)
downloadrust-ae2a720e92f78e76db5b7c1d6308fcd87d5c5281.tar.gz
rust-ae2a720e92f78e76db5b7c1d6308fcd87d5c5281.zip
Rollup merge of #64765 - alexcrichton:less-check-backtrace, r=sfackler
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')
-rw-r--r--src/libstd/thread/mod.rs3
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);
         };