mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-11 23:33:00 +00:00
Rollup merge of #47150 - dtolnay:join, r=jseyfried
Return None from Span::join if in different files Fixes #47148. r? @abonander
This commit is contained in:
commit
5a5b16ad06
@ -247,7 +247,7 @@ impl Span {
|
||||
#[unstable(feature = "proc_macro", issue = "38356")]
|
||||
pub fn join(&self, other: Span) -> Option<Span> {
|
||||
let self_loc = __internal::lookup_char_pos(self.0.lo());
|
||||
let other_loc = __internal::lookup_char_pos(self.0.lo());
|
||||
let other_loc = __internal::lookup_char_pos(other.0.lo());
|
||||
|
||||
if self_loc.file.name != other_loc.file.name { return None }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user