]> git.lizzy.rs Git - rust.git/commitdiff
remove hacks that are no longer needed
authorNiko Matsakis <niko@alum.mit.edu>
Tue, 11 Jun 2019 23:09:15 +0000 (19:09 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Wed, 12 Jun 2019 17:56:29 +0000 (13:56 -0400)
src/libsyntax/tokenstream.rs
src/libsyntax_pos/lib.rs

index 2daec9702798fd1ef5c97e2a2a5231929743f168..b32049b1da8c365992d1b284701b4553b654b331 100644 (file)
@@ -59,17 +59,6 @@ fn _dummy()
     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 https://github.com/rust-lang/rust/issues/60846
-#[cfg(parallel_compiler)]
-unsafe impl Send for TokenTree {}
-#[cfg(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)
index 8f5595968a73820e40145664052838dd00e105a7..d81cb756b0296cb988650a4d0819af226aecedf3 100644 (file)
@@ -227,14 +227,6 @@ pub fn with_ctxt(&self, ctxt: SyntaxContext) -> Span {
     }
 }
 
-// The interner is pointed to by a thread local value which is only set on the main thread
-// with parallelization is disabled. So we don't allow `Span` to transfer between threads
-// to avoid panics and other errors, even though it would be memory safe to do so.
-#[cfg(not(parallel_compiler))]
-impl !Send for Span {}
-#[cfg(not(parallel_compiler))]
-impl !Sync for Span {}
-
 impl PartialOrd for Span {
     fn partial_cmp(&self, rhs: &Self) -> Option<Ordering> {
         PartialOrd::partial_cmp(&self.data(), &rhs.data())