We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb8158d commit bb97fe0Copy full SHA for bb97fe0
src/libsyntax_pos/lib.rs
@@ -227,6 +227,14 @@ impl SpanData {
227
}
228
229
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
236
+impl !Sync for Span {}
237
+
238
impl PartialOrd for Span {
239
fn partial_cmp(&self, rhs: &Self) -> Option<Ordering> {
240
PartialOrd::partial_cmp(&self.data(), &rhs.data())
0 commit comments