mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Make macro def krate mandatory
Refactors builtin derive support to go through proper name resolution
This commit is contained in:
parent
c31c3246a8
commit
b238ddd21a
14 changed files with 91 additions and 42 deletions
|
@ -224,13 +224,7 @@ impl From<EagerMacroId> for MacroCallId {
|
|||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct MacroDefId {
|
||||
// FIXME: krate and ast_id are currently optional because we don't have a
|
||||
// definition location for built-in derives. There is one, though: the
|
||||
// standard library defines them. The problem is that it uses the new
|
||||
// `macro` syntax for this, which we don't support yet. As soon as we do
|
||||
// (which will probably require touching this code), we can instead use
|
||||
// that (and also remove the hacks for resolving built-in derives).
|
||||
pub krate: Option<CrateId>,
|
||||
pub krate: CrateId,
|
||||
pub ast_id: Option<AstId<ast::Macro>>,
|
||||
pub kind: MacroDefKind,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue