Span::resolved_at and Span::located_at to combine behavior of two spans
diff --git a/src/stable.rs b/src/stable.rs
index b5820b1..0a439ed 100644
--- a/src/stable.rs
+++ b/src/stable.rs
@@ -334,6 +334,17 @@
Span::call_site()
}
+ pub fn resolved_at(&self, _other: Span) -> Span {
+ // Stable spans consist only of line/column information, so
+ // `resolved_at` and `located_at` only select which span the
+ // caller wants line/column information from.
+ *self
+ }
+
+ pub fn located_at(&self, other: Span) -> Span {
+ other
+ }
+
#[cfg(procmacro2_semver_exempt)]
pub fn source_file(&self) -> SourceFile {
CODEMAP.with(|cm| {