mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Merge #6897
6897: Basic support for macros 2.0 r=jonas-schievink a=jonas-schievink This adds support for (built-in-only) macros 2.0, and removes some hacks used for builtin derives, which are declared via macros 2.0 in libcore. First steps for https://github.com/rust-analyzer/rust-analyzer/issues/2248. Blocked on https://github.com/rust-analyzer/ungrammar/pull/16. Co-authored-by: Jonas Schievink <jonasschievink@gmail.com> Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
This commit is contained in:
commit
63bbdb31e5
23 changed files with 286 additions and 68 deletions
|
@ -110,8 +110,8 @@ impl HasSource for TypeAlias {
|
|||
}
|
||||
}
|
||||
impl HasSource for MacroDef {
|
||||
type Ast = ast::MacroRules;
|
||||
fn source(self, db: &dyn HirDatabase) -> InFile<ast::MacroRules> {
|
||||
type Ast = ast::Macro;
|
||||
fn source(self, db: &dyn HirDatabase) -> InFile<ast::Macro> {
|
||||
InFile {
|
||||
file_id: self.id.ast_id.expect("MacroDef without ast_id").file_id,
|
||||
value: self.id.ast_id.expect("MacroDef without ast_id").to_node(db.upcast()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue