Skip to content

Commit e3e54d9

Browse files
authored
Rollup merge of rust-lang#47150 - dtolnay:join, r=jseyfried
Return None from Span::join if in different files Fixes rust-lang#47148. r? @abonander
2 parents 8eca1b3 + 2b9add2 commit e3e54d9

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)