diff options
| author | Ian Douglas Scott <ian@iandouglasscott.com> | 2017-05-21 12:38:07 -0700 |
|---|---|---|
| committer | Ian Douglas Scott <ian@iandouglasscott.com> | 2017-05-21 12:38:07 -0700 |
| commit | 66237afce454db9235525dc715238568c492f54b (patch) | |
| tree | 49283e1d5d262d37608f71dde6496ce04a3f56b3 /src/libstd/thread | |
| parent | 14f30da6132c25543da1f06c32a8c5699d3e5747 (diff) | |
| download | rust-66237afce454db9235525dc715238568c492f54b.tar.gz rust-66237afce454db9235525dc715238568c492f54b.zip | |
Fix building without backtrace feature, which was broken in ca8b754
Fixes #42139
Diffstat (limited to 'src/libstd/thread')
| -rw-r--r-- | src/libstd/thread/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index 154406a1d8b..75717abb4ad 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -359,9 +359,12 @@ impl Builder { } unsafe { thread_info::set(imp::guard::current(), their_thread); + #[cfg(feature = "backtrace")] let try_result = panic::catch_unwind(panic::AssertUnwindSafe(|| { ::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); } }; |
