aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r--crates/ra_hir/src/nameres/raw.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_hir/src/nameres/raw.rs b/crates/ra_hir/src/nameres/raw.rs
index 32a049f4e..606bd1a95 100644
--- a/crates/ra_hir/src/nameres/raw.rs
+++ b/crates/ra_hir/src/nameres/raw.rs
@@ -355,8 +355,7 @@ impl<DB: AstDatabase> RawItemsCollector<&DB> {
355 355
356 let name = m.name().map(|it| it.as_name()); 356 let name = m.name().map(|it| it.as_name());
357 let ast_id = self.source_ast_id_map.ast_id(&m); 357 let ast_id = self.source_ast_id_map.ast_id(&m);
358 let export = m.has_atom_attr("macro_export") 358 let export = m.attrs().filter_map(|x| x.simple_name()).any(|name| name == "macro_export");
359 || m.attrs().filter_map(|x| x.as_call()).any(|(name, _)| name == "macro_export");
360 359
361 let m = self.raw_items.macros.alloc(MacroData { ast_id, path, name, export }); 360 let m = self.raw_items.macros.alloc(MacroData { ast_id, path, name, export });
362 self.push_item(current_module, RawItem::Macro(m)); 361 self.push_item(current_module, RawItem::Macro(m));
@@ -387,7 +386,7 @@ impl<DB: AstDatabase> RawItemsCollector<&DB> {
387 386
388fn extract_mod_path_attribute(module: &ast::Module) -> Option<SmolStr> { 387fn extract_mod_path_attribute(module: &ast::Module) -> Option<SmolStr> {
389 module.attrs().into_iter().find_map(|attr| { 388 module.attrs().into_iter().find_map(|attr| {
390 attr.as_key_value().and_then(|(name, value)| { 389 attr.as_simple_key_value().and_then(|(name, value)| {
391 let is_path = name == "path"; 390 let is_path = name == "path";
392 if is_path { 391 if is_path {
393 Some(value) 392 Some(value)