resolve: Rename some cstore methods to match queries and add comments
about costs associated with replacing them with query calls.
This commit is contained in:
parent
99c49d95cd
commit
71927ad083
4 changed files with 12 additions and 14 deletions
|
@ -1871,7 +1871,8 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
fn def_span(&self, def_id: DefId) -> Span {
|
||||
match def_id.as_local() {
|
||||
Some(def_id) => self.tcx.source_span(def_id),
|
||||
None => self.cstore().get_span_untracked(def_id, self.tcx.sess),
|
||||
// Query `def_span` is not used because hashing its result span is expensive.
|
||||
None => self.cstore().def_span_untracked(def_id, self.tcx.sess),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue