source_analyzer::{resolve_hir_path, resolve_hir_path_as_macro, SourceAnalyzer},
Access, AssocItem, BuiltinAttr, Callable, ConstParam, Crate, Field, Function, HasSource,
HirFileId, Impl, InFile, Label, LifetimeParam, Local, MacroDef, Module, ModuleDef, Name, Path,
- ScopeDef, Tool, Trait, Type, TypeAlias, TypeParam, VariantDef,
+ ScopeDef, ToolModule, Trait, Type, TypeAlias, TypeParam, VariantDef,
};
#[derive(Debug, Clone, PartialEq, Eq)]
Macro(MacroDef),
AssocItem(AssocItem),
BuiltinAttr(BuiltinAttr),
- Tool(Tool),
+ ToolModule(ToolModule),
}
impl PathResolution {
Some(TypeNs::TypeAliasId((*alias).into()))
}
PathResolution::BuiltinAttr(_)
- | PathResolution::Tool(_)
+ | PathResolution::ToolModule(_)
| PathResolution::Local(_)
| PathResolution::Macro(_)
| PathResolution::ConstParam(_) => None,
}
/// Note: `FxHashSet<TraitId>` should be treated as an opaque type, passed into `Type
- // FIXME: rename to visible_traits to not repeat scope?
- pub fn traits_in_scope(&self) -> FxHashSet<TraitId> {
+ pub fn visible_traits(&self) -> FxHashSet<TraitId> {
let resolver = &self.resolver;
resolver.traits_in_scope(self.db.upcast())
}