Skip to content

Commit 8df48d6

Browse files
committed
Revert "std: add auto traits to TAIT bound"
This reverts commit 29e3f8b.
1 parent d06ca0f commit 8df48d6

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

library/std/src/backtrace.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,6 @@ struct Capture {
141141
frames: Vec<BacktraceFrame>,
142142
}
143143

144-
fn _assert_send_sync() {
145-
fn _assert<T: Send + Sync>() {}
146-
_assert::<Backtrace>();
147-
}
148-
149144
/// A single frame of a backtrace.
150145
#[unstable(feature = "backtrace_frames", issue = "79676")]
151146
pub struct BacktraceFrame {
@@ -428,7 +423,7 @@ impl fmt::Display for Backtrace {
428423
}
429424
}
430425

431-
type LazyResolve = impl (FnOnce() -> Capture) + Send + Sync + UnwindSafe;
426+
type LazyResolve = impl FnOnce() -> Capture + UnwindSafe;
432427

433428
fn lazy_resolve(mut capture: Capture) -> LazyResolve {
434429
move || {

library/std/tests/backtrace.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
use std::backtrace::Backtrace;
2+
3+
// Unfortunately, this cannot be a unit test because that causes problems
4+
// with type-alias-impl-trait (the assert counts as a defining use).
5+
#[test]
6+
fn assert_send_sync() {
7+
fn assert<T: Send + Sync>() {}
8+
9+
assert::<Backtrace>();
10+
}

0 commit comments

Comments
 (0)