Fix proc-macro attributes being shadowed by their functions in IDE layer
This commit is contained in:
@@ -329,6 +329,10 @@ impl<'db, DB: HirDatabase> Semantics<'db, DB> {
|
||||
self.imp.resolve_path(path)
|
||||
}
|
||||
|
||||
pub fn resolve_path_as_macro(&self, path: &ast::Path) -> Option<MacroDef> {
|
||||
self.imp.resolve_path_as_macro(path)
|
||||
}
|
||||
|
||||
pub fn resolve_extern_crate(&self, extern_crate: &ast::ExternCrate) -> Option<Crate> {
|
||||
self.imp.resolve_extern_crate(extern_crate)
|
||||
}
|
||||
@@ -845,6 +849,12 @@ impl<'db> SemanticsImpl<'db> {
|
||||
self.analyze(path.syntax()).resolve_path(self.db, path)
|
||||
}
|
||||
|
||||
// FIXME: This shouldn't exist, but is currently required to always resolve attribute paths in
|
||||
// the IDE layer due to namespace collisions
|
||||
fn resolve_path_as_macro(&self, path: &ast::Path) -> Option<MacroDef> {
|
||||
self.analyze(path.syntax()).resolve_path_as_macro(self.db, path)
|
||||
}
|
||||
|
||||
fn resolve_extern_crate(&self, extern_crate: &ast::ExternCrate) -> Option<Crate> {
|
||||
let krate = self.scope(extern_crate.syntax()).krate()?;
|
||||
krate.dependencies(self.db).into_iter().find_map(|dep| {
|
||||
|
||||
Reference in New Issue
Block a user