Skip to content
/ rust Public
forked from rust-lang/rust

Commit 29e3f8b

Browse files
committed
std: add auto traits to TAIT bound
1 parent 6776af5 commit 29e3f8b

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

library/std/src/backtrace.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ struct Capture {
140140
frames: Vec<BacktraceFrame>,
141141
}
142142

143+
fn _assert_send_sync() {
144+
fn _assert<T: Send + Sync>() {}
145+
_assert::<Backtrace>();
146+
}
147+
143148
/// A single frame of a backtrace.
144149
#[unstable(feature = "backtrace_frames", issue = "79676")]
145150
pub struct BacktraceFrame {
@@ -422,7 +427,7 @@ impl fmt::Display for Backtrace {
422427
}
423428
}
424429

425-
type LazyResolve = impl FnOnce() -> Capture;
430+
type LazyResolve = impl (FnOnce() -> Capture) + Send + Sync;
426431

427432
fn lazy_resolve(mut capture: Capture) -> LazyResolve {
428433
move || {

library/std/tests/backtrace.rs

-10
This file was deleted.

0 commit comments

Comments
 (0)