Skip to content

Commit 58b3923

Browse files
committed
Remove unused code from rustc_span
1 parent 338fad2 commit 58b3923

File tree

3 files changed

+0
-23
lines changed

3 files changed

+0
-23
lines changed

compiler/rustc_span/src/hygiene.rs

-8
Original file line numberDiff line numberDiff line change
@@ -619,14 +619,6 @@ impl SyntaxContext {
619619
HygieneData::with(|data| data.outer_mark(self))
620620
}
621621

622-
#[inline]
623-
pub fn outer_mark_with_data(self) -> (ExpnId, Transparency, ExpnData) {
624-
HygieneData::with(|data| {
625-
let (expn_id, transparency) = data.outer_mark(self);
626-
(expn_id, transparency, data.expn_data(expn_id).clone())
627-
})
628-
}
629-
630622
pub fn dollar_crate_name(self) -> Symbol {
631623
HygieneData::with(|data| data.syntax_context_data[self.0 as usize].dollar_crate_name)
632624
}

compiler/rustc_span/src/lib.rs

-6
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,6 @@ impl FileName {
223223
}
224224
}
225225

226-
pub fn quote_expansion_source_code(src: &str) -> FileName {
227-
let mut hasher = StableHasher::new();
228-
src.hash(&mut hasher);
229-
FileName::QuoteExpansion(hasher.finish())
230-
}
231-
232226
pub fn macro_expansion_source_code(src: &str) -> FileName {
233227
let mut hasher = StableHasher::new();
234228
src.hash(&mut hasher);

compiler/rustc_span/src/source_map.rs

-9
Original file line numberDiff line numberDiff line change
@@ -451,15 +451,6 @@ impl SourceMap {
451451
}
452452
}
453453

454-
/// Returns a new `Span` covering the start and end `BytePos`s of the file containing the given
455-
/// `pos`. This can be used to quickly determine if another `BytePos` or `Span` is from the same
456-
/// file.
457-
pub fn lookup_file_span(&self, pos: BytePos) -> Span {
458-
let idx = self.lookup_source_file_idx(pos);
459-
let SourceFile { start_pos, end_pos, .. } = *(*self.files.borrow().source_files)[idx];
460-
Span::with_root_ctxt(start_pos, end_pos)
461-
}
462-
463454
/// Returns `Some(span)`, a union of the LHS and RHS span. The LHS must precede the RHS. If
464455
/// there are gaps between LHS and RHS, the resulting union will cross these gaps.
465456
/// For this to work,

0 commit comments

Comments
 (0)