about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/backtrace.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/library/std/src/backtrace.rs b/library/std/src/backtrace.rs
index 18d5f3e9108..f0e199fac73 100644
--- a/library/std/src/backtrace.rs
+++ b/library/std/src/backtrace.rs
@@ -140,6 +140,11 @@ struct Capture {
     frames: Vec<BacktraceFrame>,
 }
 
+fn _assert_send_sync() {
+    fn _assert<T: Send + Sync>() {}
+    _assert::<Backtrace>();
+}
+
 /// A single frame of a backtrace.
 #[unstable(feature = "backtrace_frames", issue = "79676")]
 pub struct BacktraceFrame {
@@ -422,7 +427,7 @@ impl fmt::Display for Backtrace {
     }
 }
 
-type LazyResolve = impl FnOnce() -> Capture;
+type LazyResolve = impl (FnOnce() -> Capture) + Send + Sync;
 
 fn lazy_resolve(mut capture: Capture) -> LazyResolve {
     move || {