Skip to content
Browse files

put back the workarounds for #60846

based on #61754 (comment) I am adding `bootstrap` to the cfg-preconditions for the two manual `unsafe impls`'s of `Send` and `Sync` for `TokenTree`.
  • Loading branch information...
pnkfelix committed Jun 14, 2019
1 parent bb97fe0 commit 0baa9258dd2f901a24d744705f514fa678e64940
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/libsyntax/
@@ -59,6 +59,17 @@ where
TokenStream: Send + Sync,

// These are safe since we ensure that they hold for all fields in the `_dummy` function.
// These impls are only here because the compiler takes forever to compute the Send and Sync
// bounds without them.
// FIXME: Remove these impls when the compiler can compute the bounds quickly again.
// See
#[cfg(all(bootstrap, parallel_compiler))]
unsafe impl Send for TokenTree {}
#[cfg(all(bootstrap, parallel_compiler))]
unsafe impl Sync for TokenTree {}

impl TokenTree {
/// Use this token tree as a matcher to parse given tts.
pub fn parse(cx: &base::ExtCtxt<'_>, mtch: &[quoted::TokenTree], tts: TokenStream)

0 comments on commit 0baa925

Please sign in to comment.
You can’t perform that action at this time.