about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--crates/proc_macro_srv/src/abis/abi_1_47/rustc_server.rs5
-rw-r--r--crates/proc_macro_srv/src/abis/abi_1_54/rustc_server.rs5
-rw-r--r--crates/proc_macro_srv/src/abis/abi_1_56/rustc_server.rs5
-rw-r--r--crates/proc_macro_srv/src/abis/abi_1_57/rustc_server.rs5
-rw-r--r--crates/proc_macro_srv/src/abis/abi_1_58/rustc_server.rs5
5 files changed, 15 insertions, 10 deletions
diff --git a/crates/proc_macro_srv/src/abis/abi_1_47/rustc_server.rs b/crates/proc_macro_srv/src/abis/abi_1_47/rustc_server.rs
index 1ef137029d1..4dc506e0f19 100644
--- a/crates/proc_macro_srv/src/abis/abi_1_47/rustc_server.rs
+++ b/crates/proc_macro_srv/src/abis/abi_1_47/rustc_server.rs
@@ -662,8 +662,9 @@ impl server::Span for Rustc {
         // FIXME handle span
         LineColumn { line: 0, column: 0 }
     }
-    fn join(&mut self, _first: Self::Span, _second: Self::Span) -> Option<Self::Span> {
-        None
+    fn join(&mut self, first: Self::Span, _second: Self::Span) -> Option<Self::Span> {
+        // Just return the first span again, because some macros will unwrap the result.
+        Some(first)
     }
     fn resolved_at(&mut self, _span: Self::Span, _at: Self::Span) -> Self::Span {
         // FIXME handle span
diff --git a/crates/proc_macro_srv/src/abis/abi_1_54/rustc_server.rs b/crates/proc_macro_srv/src/abis/abi_1_54/rustc_server.rs
index 3904cb8f3ea..7b333836b11 100644
--- a/crates/proc_macro_srv/src/abis/abi_1_54/rustc_server.rs
+++ b/crates/proc_macro_srv/src/abis/abi_1_54/rustc_server.rs
@@ -665,8 +665,9 @@ impl server::Span for Rustc {
         // FIXME handle span
         LineColumn { line: 0, column: 0 }
     }
-    fn join(&mut self, _first: Self::Span, _second: Self::Span) -> Option<Self::Span> {
-        None
+    fn join(&mut self, first: Self::Span, _second: Self::Span) -> Option<Self::Span> {
+        // Just return the first span again, because some macros will unwrap the result.
+        Some(first)
     }
     fn resolved_at(&mut self, _span: Self::Span, _at: Self::Span) -> Self::Span {
         // FIXME handle span
diff --git a/crates/proc_macro_srv/src/abis/abi_1_56/rustc_server.rs b/crates/proc_macro_srv/src/abis/abi_1_56/rustc_server.rs
index cf797752310..8517eddf991 100644
--- a/crates/proc_macro_srv/src/abis/abi_1_56/rustc_server.rs
+++ b/crates/proc_macro_srv/src/abis/abi_1_56/rustc_server.rs
@@ -677,8 +677,9 @@ impl server::Span for Rustc {
         // FIXME handle span
         LineColumn { line: 0, column: 0 }
     }
-    fn join(&mut self, _first: Self::Span, _second: Self::Span) -> Option<Self::Span> {
-        None
+    fn join(&mut self, first: Self::Span, _second: Self::Span) -> Option<Self::Span> {
+        // Just return the first span again, because some macros will unwrap the result.
+        Some(first)
     }
     fn resolved_at(&mut self, _span: Self::Span, _at: Self::Span) -> Self::Span {
         // FIXME handle span
diff --git a/crates/proc_macro_srv/src/abis/abi_1_57/rustc_server.rs b/crates/proc_macro_srv/src/abis/abi_1_57/rustc_server.rs
index 00077ebc5bf..48597e894c6 100644
--- a/crates/proc_macro_srv/src/abis/abi_1_57/rustc_server.rs
+++ b/crates/proc_macro_srv/src/abis/abi_1_57/rustc_server.rs
@@ -677,8 +677,9 @@ impl server::Span for Rustc {
         // FIXME handle span
         LineColumn { line: 0, column: 0 }
     }
-    fn join(&mut self, _first: Self::Span, _second: Self::Span) -> Option<Self::Span> {
-        None
+    fn join(&mut self, first: Self::Span, _second: Self::Span) -> Option<Self::Span> {
+        // Just return the first span again, because some macros will unwrap the result.
+        Some(first)
     }
     fn resolved_at(&mut self, _span: Self::Span, _at: Self::Span) -> Self::Span {
         // FIXME handle span
diff --git a/crates/proc_macro_srv/src/abis/abi_1_58/rustc_server.rs b/crates/proc_macro_srv/src/abis/abi_1_58/rustc_server.rs
index 5c3f4da0014..6c57ac92dc6 100644
--- a/crates/proc_macro_srv/src/abis/abi_1_58/rustc_server.rs
+++ b/crates/proc_macro_srv/src/abis/abi_1_58/rustc_server.rs
@@ -681,8 +681,9 @@ impl server::Span for Rustc {
         // FIXME handle span
         LineColumn { line: 0, column: 0 }
     }
-    fn join(&mut self, _first: Self::Span, _second: Self::Span) -> Option<Self::Span> {
-        None
+    fn join(&mut self, first: Self::Span, _second: Self::Span) -> Option<Self::Span> {
+        // Just return the first span again, because some macros will unwrap the result.
+        Some(first)
     }
     fn resolved_at(&mut self, _span: Self::Span, _at: Self::Span) -> Self::Span {
         // FIXME handle span