Skip to content
Browse files

revert change incorrectly identified as "hack"

put back negative impls to ensure `Span` is not `Send` nor `Sync`
  • Loading branch information...
pnkfelix committed Jun 13, 2019
1 parent cb8158d commit bb97fe0bae0d4dcfd106e77a951ea8dbb4be2659
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/libsyntax_pos/
@@ -227,6 +227,14 @@ impl SpanData {

// 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.
impl !Send for Span {}
impl !Sync for Span {}

impl PartialOrd for Span {
fn partial_cmp(&self, rhs: &Self) -> Option<Ordering> {
PartialOrd::partial_cmp(&, &

0 comments on commit bb97fe0

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