remove some hacks from nameresolution for macros

This commit is contained in:
Aleksey Kladov 2019-06-08 20:42:02 +03:00
parent 780e1a365b
commit caefa6982b
7 changed files with 68 additions and 66 deletions

View file

@ -267,9 +267,8 @@ impl SourceAnalyzer {
db: &impl HirDatabase,
macro_call: &ast::MacroCall,
) -> Option<MacroDef> {
let id =
self.resolver.resolve_macro_call(db, macro_call.path().and_then(Path::from_ast))?;
Some(MacroDef { id })
let path = macro_call.path().and_then(Path::from_ast)?;
self.resolver.resolve_path_as_macro(db, &path)
}
pub fn resolve_hir_path(