1
Fork 0

Fix building without backtrace feature, which was broken in ca8b754

Fixes #42139
This commit is contained in:
Ian Douglas Scott 2017-05-21 12:38:07 -07:00
parent 14f30da613
commit 66237afce4
No known key found for this signature in database
GPG key ID: 4924E10E199B5959
2 changed files with 8 additions and 0 deletions

View file

@ -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);
}
};