mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
strongy-typed ids for macros
This commit is contained in:
parent
fb8b354dcc
commit
071a19537d
4 changed files with 19 additions and 33 deletions
|
@ -5,7 +5,7 @@ use ra_syntax::{SyntaxNodePtr, TreeArc, SyntaxNode, SourceFile, AstNode, ast};
|
|||
|
||||
use crate::{HirFileId, DefDatabase};
|
||||
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
#[derive(Debug, PartialEq, Eq, Hash)]
|
||||
pub(crate) struct AstId<N: AstNode> {
|
||||
file_id: HirFileId,
|
||||
file_ast_id: FileAstId<N>,
|
||||
|
@ -30,7 +30,7 @@ impl<N: AstNode> AstId<N> {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
#[derive(Debug, PartialEq, Eq, Hash)]
|
||||
pub(crate) struct FileAstId<N: AstNode> {
|
||||
raw: SourceFileItemId,
|
||||
_ty: PhantomData<N>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue