diff options
author | Florian Diebold <[email protected]> | 2019-12-05 14:10:33 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-12-05 16:23:09 +0000 |
commit | 18f6a995d0fc1f45099f3cc810a5d55d5401b41b (patch) | |
tree | 808cb0f025b488f59935007802d1bb85f1cf0044 /crates/ra_hir/src/from_source.rs | |
parent | 4c0bd068da39e74c66104206e27c270454e3562e (diff) |
Add expansion infrastructure for derive macros
Diffstat (limited to 'crates/ra_hir/src/from_source.rs')
-rw-r--r-- | crates/ra_hir/src/from_source.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/from_source.rs b/crates/ra_hir/src/from_source.rs index 18d87f6d7..0d3ecbc77 100644 --- a/crates/ra_hir/src/from_source.rs +++ b/crates/ra_hir/src/from_source.rs | |||
@@ -152,9 +152,9 @@ impl FromSource for MacroDef { | |||
152 | 152 | ||
153 | let module_src = ModuleSource::from_child_node(db, src.as_ref().map(|it| it.syntax())); | 153 | let module_src = ModuleSource::from_child_node(db, src.as_ref().map(|it| it.syntax())); |
154 | let module = Module::from_definition(db, InFile::new(src.file_id, module_src))?; | 154 | let module = Module::from_definition(db, InFile::new(src.file_id, module_src))?; |
155 | let krate = module.krate().crate_id(); | 155 | let krate = Some(module.krate().crate_id()); |
156 | 156 | ||
157 | let ast_id = AstId::new(src.file_id, db.ast_id_map(src.file_id).ast_id(&src.value)); | 157 | let ast_id = Some(AstId::new(src.file_id, db.ast_id_map(src.file_id).ast_id(&src.value))); |
158 | 158 | ||
159 | let id: MacroDefId = MacroDefId { krate, ast_id, kind }; | 159 | let id: MacroDefId = MacroDefId { krate, ast_id, kind }; |
160 | Some(MacroDef { id }) | 160 | Some(MacroDef { id }) |