aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres/raw.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-03-26 15:03:17 +0000
committerAleksey Kladov <[email protected]>2019-03-26 15:03:17 +0000
commit071a19537d4399fd04d1e9594ab7878502a12d21 (patch)
treeb6cdd380b2af4f570ebc6e831ef3ebaa5c4e9adc /crates/ra_hir/src/nameres/raw.rs
parentfb8b354dcc837d5eb9b81fc205e4282a203df177 (diff)
strongy-typed ids for macros
Diffstat (limited to 'crates/ra_hir/src/nameres/raw.rs')
-rw-r--r--crates/ra_hir/src/nameres/raw.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/nameres/raw.rs b/crates/ra_hir/src/nameres/raw.rs
index 09acd5a98..684bd1d50 100644
--- a/crates/ra_hir/src/nameres/raw.rs
+++ b/crates/ra_hir/src/nameres/raw.rs
@@ -160,7 +160,7 @@ impl_arena_id!(Macro);
160 160
161#[derive(Debug, PartialEq, Eq)] 161#[derive(Debug, PartialEq, Eq)]
162pub(super) struct MacroData { 162pub(super) struct MacroData {
163 pub(super) source_item_id: SourceFileItemId, 163 pub(super) ast_id: FileAstId<ast::MacroCall>,
164 pub(super) path: Path, 164 pub(super) path: Path,
165 pub(super) name: Option<Name>, 165 pub(super) name: Option<Name>,
166 pub(super) export: bool, 166 pub(super) export: bool,
@@ -285,9 +285,9 @@ impl RawItemsCollector {
285 }; 285 };
286 286
287 let name = m.name().map(|it| it.as_name()); 287 let name = m.name().map(|it| it.as_name());
288 let source_item_id = self.source_file_items.id_of_unchecked(m.syntax()); 288 let ast_id = self.source_file_items.ast_id(m);
289 let export = m.has_atom_attr("macro_export"); 289 let export = m.has_atom_attr("macro_export");
290 let m = self.raw_items.macros.alloc(MacroData { source_item_id, path, name, export }); 290 let m = self.raw_items.macros.alloc(MacroData { ast_id, path, name, export });
291 self.push_item(current_module, RawItem::Macro(m)); 291 self.push_item(current_module, RawItem::Macro(m));
292 } 292 }
293 293