aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/code_model/src.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-12-05 14:10:33 +0000
committerFlorian Diebold <[email protected]>2019-12-05 16:23:09 +0000
commit18f6a995d0fc1f45099f3cc810a5d55d5401b41b (patch)
tree808cb0f025b488f59935007802d1bb85f1cf0044 /crates/ra_hir/src/code_model/src.rs
parent4c0bd068da39e74c66104206e27c270454e3562e (diff)
Add expansion infrastructure for derive macros
Diffstat (limited to 'crates/ra_hir/src/code_model/src.rs')
-rw-r--r--crates/ra_hir/src/code_model/src.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_hir/src/code_model/src.rs b/crates/ra_hir/src/code_model/src.rs
index d9bccd902..78a454082 100644
--- a/crates/ra_hir/src/code_model/src.rs
+++ b/crates/ra_hir/src/code_model/src.rs
@@ -105,7 +105,10 @@ impl HasSource for TypeAlias {
105impl HasSource for MacroDef { 105impl HasSource for MacroDef {
106 type Ast = ast::MacroCall; 106 type Ast = ast::MacroCall;
107 fn source(self, db: &impl DefDatabase) -> InFile<ast::MacroCall> { 107 fn source(self, db: &impl DefDatabase) -> InFile<ast::MacroCall> {
108 InFile { file_id: self.id.ast_id.file_id, value: self.id.ast_id.to_node(db) } 108 InFile {
109 file_id: self.id.ast_id.expect("MacroDef without ast_id").file_id,
110 value: self.id.ast_id.expect("MacroDef without ast_id").to_node(db),
111 }
109 } 112 }
110} 113}
111impl HasSource for ImplBlock { 114impl HasSource for ImplBlock {