diff options
| author | bors <bors@rust-lang.org> | 2017-05-10 11:37:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-05-10 11:37:22 +0000 |
| commit | 25a161765fb90f2bfc78bda8fef944048e72bd26 (patch) | |
| tree | 0dc21722451293bbedf2367b1fea0fa06c112bb7 /src/libstd/thread/mod.rs | |
| parent | 2b97174ada7fb1854269558ed2cf3b089e58beee (diff) | |
| parent | ca8b75466cef854d30fdf7614c2358b1eb46816e (diff) | |
| download | rust-25a161765fb90f2bfc78bda8fef944048e72bd26.tar.gz rust-25a161765fb90f2bfc78bda8fef944048e72bd26.zip | |
Auto merge of #41815 - Yamakaky:improve-backtrace-bottom, r=alexcrichton
Improve cleaning of the bottom of the backtrace Following https://github.com/rust-lang/rust/pull/40264. It only cleans the bottom of the trace (after the main). It handles correctly the normal main, tests, benchmarks and threads. I kept `skipped_before` since it will be used later for the cleaning of the top.
Diffstat (limited to 'src/libstd/thread/mod.rs')
| -rw-r--r-- | src/libstd/thread/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index 1bb0d9f3bab..4432f898e04 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -365,7 +365,9 @@ impl Builder { } unsafe { thread_info::set(imp::guard::current(), their_thread); - let try_result = panic::catch_unwind(panic::AssertUnwindSafe(f)); + let try_result = panic::catch_unwind(panic::AssertUnwindSafe(|| { + ::sys_common::backtrace::__rust_begin_short_backtrace(f) + })); *their_packet.get() = Some(try_result); } }; |
