mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Replace module_tree with CrateDefMap
This commit is contained in:
parent
182c05a96c
commit
2195d1db6d
16 changed files with 333 additions and 511 deletions
|
@ -296,6 +296,12 @@ impl AstItemDef<ast::TypeAliasDef> for TypeId {
|
|||
pub struct SourceFileItemId(RawId);
|
||||
impl_arena_id!(SourceFileItemId);
|
||||
|
||||
impl SourceFileItemId {
|
||||
pub(crate) fn with_file_id(self, file_id: HirFileId) -> SourceItemId {
|
||||
SourceItemId { file_id, item_id: self }
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct SourceItemId {
|
||||
pub(crate) file_id: HirFileId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue