mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
internal: Remove unnecessary usages of ExpansionInfo
This commit is contained in:
parent
604479c373
commit
d252247ab7
7 changed files with 175 additions and 106 deletions
|
@ -1,5 +1,5 @@
|
|||
//! Span maps for real files and macro expansions.
|
||||
use span::{FileId, HirFileId, HirFileIdRepr, Span};
|
||||
use span::{FileId, HirFileId, HirFileIdRepr, MacroFileId, Span};
|
||||
use syntax::{AstNode, TextRange};
|
||||
use triomphe::Arc;
|
||||
|
||||
|
@ -94,3 +94,10 @@ pub(crate) fn real_span_map(db: &dyn ExpandDatabase, file_id: FileId) -> Arc<Rea
|
|||
tree.syntax().text_range().end(),
|
||||
))
|
||||
}
|
||||
|
||||
pub(crate) fn expansion_span_map(
|
||||
db: &dyn ExpandDatabase,
|
||||
file_id: MacroFileId,
|
||||
) -> Arc<ExpansionSpanMap> {
|
||||
db.parse_macro_expansion(file_id).value.1
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue