mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
internal: Record unresolved derive invocations in hir
This commit is contained in:
parent
989c06b25d
commit
6b7b09d329
8 changed files with 87 additions and 52 deletions
|
@ -17,7 +17,7 @@ use syntax::{
|
|||
match_ast, AstToken, SyntaxKind, SyntaxNode, SyntaxToken,
|
||||
};
|
||||
|
||||
use crate::{helpers::try_resolve_derive_input, RootDatabase};
|
||||
use crate::RootDatabase;
|
||||
|
||||
// FIXME: a more precise name would probably be `Symbol`?
|
||||
#[derive(Debug, PartialEq, Eq, Copy, Clone, Hash)]
|
||||
|
@ -55,11 +55,8 @@ impl Definition {
|
|||
let attr = ast::TokenTree::cast(parent.clone())
|
||||
.and_then(|tt| tt.parent_meta())
|
||||
.and_then(|meta| meta.parent_attr());
|
||||
if let Some(attr) = attr {
|
||||
return try_resolve_derive_input(&sema, &attr, &ident)
|
||||
.map(Into::into)
|
||||
.into_iter()
|
||||
.collect();
|
||||
if let Some(_) = attr {
|
||||
return sema.resolve_derive_ident(&ident).map(Into::into).into_iter().collect();
|
||||
}
|
||||
}
|
||||
Self::from_node(sema, &parent)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue