mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-31 00:53:48 +00:00
std: add auto traits to TAIT bound
This commit is contained in:
parent
6776af529a
commit
29e3f8b793
@ -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 || {
|
||||
|
@ -1,10 +0,0 @@
|
||||
use std::backtrace::Backtrace;
|
||||
|
||||
// Unfortunately, this cannot be a unit test because that causes problems
|
||||
// with type-alias-impl-trait (the assert counts as a defining use).
|
||||
#[test]
|
||||
fn assert_send_sync() {
|
||||
fn assert<T: Send + Sync>() {}
|
||||
|
||||
assert::<Backtrace>();
|
||||
}
|
Loading…
Reference in New Issue
Block a user