Skip to content

Commit

Permalink
std: add auto traits to TAIT bound
Browse files Browse the repository at this point in the history
  • Loading branch information
joboet committed Jul 26, 2023
1 parent 6776af5 commit 29e3f8b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
7 changes: 6 additions & 1 deletion library/std/src/backtrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 || {
Expand Down
10 changes: 0 additions & 10 deletions library/std/tests/backtrace.rs

This file was deleted.

0 comments on commit 29e3f8b

Please sign in to comment.