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 1ef137029d..4dc506e0f1 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 { - None + fn join(&mut self, first: Self::Span, _second: Self::Span) -> Option { + // 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 3904cb8f3e..7b333836b1 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 { - None + fn join(&mut self, first: Self::Span, _second: Self::Span) -> Option { + // 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 cf79775231..8517eddf99 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 { - None + fn join(&mut self, first: Self::Span, _second: Self::Span) -> Option { + // 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 00077ebc5b..48597e894c 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 { - None + fn join(&mut self, first: Self::Span, _second: Self::Span) -> Option { + // 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 5c3f4da001..6c57ac92dc 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 { - None + fn join(&mut self, first: Self::Span, _second: Self::Span) -> Option { + // 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