We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb97fe0 commit 0baa925Copy full SHA for 0baa925
src/libsyntax/tokenstream.rs
@@ -59,6 +59,17 @@ where
59
TokenStream: Send + Sync,
60
{}
61
62
+// These are safe since we ensure that they hold for all fields in the `_dummy` function.
63
+//
64
+// These impls are only here because the compiler takes forever to compute the Send and Sync
65
+// bounds without them.
66
+// FIXME: Remove these impls when the compiler can compute the bounds quickly again.
67
+// See https://github.com/rust-lang/rust/issues/60846
68
+#[cfg(all(bootstrap, parallel_compiler))]
69
+unsafe impl Send for TokenTree {}
70
71
+unsafe impl Sync for TokenTree {}
72
+
73
impl TokenTree {
74
/// Use this token tree as a matcher to parse given tts.
75
pub fn parse(cx: &base::ExtCtxt<'_>, mtch: &[quoted::TokenTree], tts: TokenStream)
0 commit comments