Skip to content

Commit bf1a5e7

Browse files
committed
remove is_local_span as it is no longer used
1 parent 3ae03e0 commit bf1a5e7

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

compiler/rustc_span/src/source_map.rs

-11
Original file line numberDiff line numberDiff line change
@@ -586,17 +586,6 @@ impl SourceMap {
586586
}
587587
}
588588

589-
/// Returns whether or not this span points into a file
590-
/// in the current crate. This may be `false` for spans
591-
/// produced by a macro expansion, or for spans associated
592-
/// with the definition of an item in a foreign crate
593-
pub fn is_local_span(&self, sp: Span) -> bool {
594-
let local_begin = self.lookup_byte_offset(sp.lo());
595-
let local_end = self.lookup_byte_offset(sp.hi());
596-
// This might be a weird span that covers multiple files
597-
local_begin.sf.src.is_some() && local_end.sf.src.is_some()
598-
}
599-
600589
pub fn is_span_accessible(&self, sp: Span) -> bool {
601590
self.span_to_source(sp, |src, start_index, end_index| {
602591
Ok(src.get(start_index..end_index).is_some())

0 commit comments

Comments
 (0)