@@ -26,12 +26,12 @@ use hir_def::{
2626 } ,
2727 hir:: { BindingId , Expr , ExprId , ExprOrPatId , Pat } ,
2828 lang_item:: LangItem ,
29- nameres:: { MacroSubNs , block_def_map , crate_def_map } ,
29+ nameres:: MacroSubNs ,
3030 resolver:: { HasResolver , Resolver , TypeNs , ValueNs , resolver_for_scope} ,
3131 type_ref:: { Mutability , TypeRefId } ,
3232} ;
3333use hir_expand:: {
34- HirFileId , InFile , MacroCallId ,
34+ HirFileId , InFile ,
3535 mod_path:: { ModPath , PathKind , path} ,
3636 name:: { AsName , Name } ,
3737} ;
@@ -218,18 +218,6 @@ impl<'db> SourceAnalyzer<'db> {
218218 } )
219219 }
220220
221- pub ( crate ) fn expansion (
222- & self ,
223- db : & dyn HirDatabase ,
224- macro_call : InFile < & ast:: MacroCall > ,
225- ) -> Option < MacroCallId > {
226- self . store_sm ( ) . and_then ( |sm| sm. expansion ( macro_call) ) . or_else ( || {
227- let ast_id_map = db. ast_id_map ( macro_call. file_id ) ;
228- let call_ast_id = macro_call. with_value ( ast_id_map. ast_id ( macro_call. value ) ) ;
229- self . resolver . item_scopes ( ) . find_map ( |scope| scope. macro_invoc ( call_ast_id) )
230- } )
231- }
232-
233221 fn trait_environment ( & self , db : & ' db dyn HirDatabase ) -> Arc < TraitEnvironment > {
234222 self . body_ ( ) . map ( |( def, ..) | def) . map_or_else (
235223 || TraitEnvironment :: empty ( self . resolver . krate ( ) ) ,
@@ -753,21 +741,6 @@ impl<'db> SourceAnalyzer<'db> {
753741 ) )
754742 }
755743
756- pub ( crate ) fn resolve_macro_call (
757- & self ,
758- db : & dyn HirDatabase ,
759- macro_call : InFile < & ast:: MacroCall > ,
760- ) -> Option < Macro > {
761- self . expansion ( db, macro_call) . and_then ( |it| {
762- let def = it. lookup ( db) . def ;
763- let def_map = match def. block {
764- Some ( block) => block_def_map ( db, base_db:: salsa:: plumbing:: FromId :: from_id ( block) ) ,
765- None => crate_def_map ( db, def. krate ) ,
766- } ;
767- def_map. macro_def_to_macro_id . get ( & def. kind . erased_ast_id ( ) ) . map ( |it| ( * it) . into ( ) )
768- } )
769- }
770-
771744 pub ( crate ) fn resolve_bind_pat_to_const (
772745 & self ,
773746 db : & ' db dyn HirDatabase ,
0 commit comments