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:
@@ -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()),
|
||||
|
||||
Reference in New Issue
Block a user