Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/source_analyzer.rs')
| -rw-r--r-- | crates/hir/src/source_analyzer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir/src/source_analyzer.rs b/crates/hir/src/source_analyzer.rs index 03e4420985..ef32a5891c 100644 --- a/crates/hir/src/source_analyzer.rs +++ b/crates/hir/src/source_analyzer.rs @@ -371,10 +371,10 @@ impl SourceAnalyzer { return builtin.map(PathResolution::BuiltinAttr); } return match resolve_hir_path_as_macro(db, &self.resolver, &hir_path) { - res @ Some(m) if m.is_attr() => res.map(PathResolution::Macro), + Some(m) => Some(PathResolution::Macro(m)), // this labels any path that starts with a tool module as the tool itself, this is technically wrong // but there is no benefit in differentiating these two cases for the time being - _ => path.first_segment().and_then(|it| it.name_ref()).and_then(|name_ref| { + None => path.first_segment().and_then(|it| it.name_ref()).and_then(|name_ref| { match self.resolver.krate() { Some(krate) => ToolModule::by_name(db, krate.into(), &name_ref.text()), None => ToolModule::builtin(&name_ref.text()), |