Skip to content

Commit 2b9add2

Browse files
committed
Return None from Span::join if in different files
1 parent 0f4ebf9 commit 2b9add2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libproc_macro/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ impl Span {
247247
#[unstable(feature = "proc_macro", issue = "38356")]
248248
pub fn join(&self, other: Span) -> Option<Span> {
249249
let self_loc = __internal::lookup_char_pos(self.0.lo());
250-
let other_loc = __internal::lookup_char_pos(self.0.lo());
250+
let other_loc = __internal::lookup_char_pos(other.0.lo());
251251

252252
if self_loc.file.name != other_loc.file.name { return None }
253253

0 commit comments

Comments
 (0)