Skip to content

Commit 6fdcc82

Browse files
committed
remove hacks that are no longer needed
1 parent 9639d8e commit 6fdcc82

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

src/libsyntax/tokenstream.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,6 @@ where
5959
TokenStream: Send + Sync,
6060
{}
6161

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(parallel_compiler)]
69-
unsafe impl Send for TokenTree {}
70-
#[cfg(parallel_compiler)]
71-
unsafe impl Sync for TokenTree {}
72-
7362
impl TokenTree {
7463
/// Use this token tree as a matcher to parse given tts.
7564
pub fn parse(cx: &base::ExtCtxt<'_>, mtch: &[quoted::TokenTree], tts: TokenStream)

src/libsyntax_pos/lib.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -227,14 +227,6 @@ impl SpanData {
227227
}
228228
}
229229

230-
// The interner is pointed to by a thread local value which is only set on the main thread
231-
// with parallelization is disabled. So we don't allow `Span` to transfer between threads
232-
// to avoid panics and other errors, even though it would be memory safe to do so.
233-
#[cfg(not(parallel_compiler))]
234-
impl !Send for Span {}
235-
#[cfg(not(parallel_compiler))]
236-
impl !Sync for Span {}
237-
238230
impl PartialOrd for Span {
239231
fn partial_cmp(&self, rhs: &Self) -> Option<Ordering> {
240232
PartialOrd::partial_cmp(&self.data(), &rhs.data())

0 commit comments

Comments
 (0)