@@ -7,7 +7,7 @@ use crate::{BuiltinMacroState, Determinacy};
7
7
use crate :: { DeriveData , Finalize , ParentScope , ResolutionError , Resolver , ScopeSet } ;
8
8
use crate :: { ModuleKind , ModuleOrUniformRoot , NameBinding , PathResult , Segment } ;
9
9
use rustc_ast:: expand:: StrippedCfgItem ;
10
- use rustc_ast:: { self as ast, attr, Inline , ItemKind , ModKind , NodeId } ;
10
+ use rustc_ast:: { self as ast, attr, Crate , Inline , ItemKind , ModKind , NodeId } ;
11
11
use rustc_ast_pretty:: pprust;
12
12
use rustc_attr:: StabilityLevel ;
13
13
use rustc_data_structures:: intern:: Interned ;
@@ -674,7 +674,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
674
674
res. map ( |res| ( self . get_macro ( res) . map ( |macro_data| macro_data. ext ) , res) )
675
675
}
676
676
677
- pub ( crate ) fn finalize_macro_resolutions ( & mut self ) {
677
+ pub ( crate ) fn finalize_macro_resolutions ( & mut self , krate : & Crate ) {
678
678
let check_consistency = |this : & mut Self ,
679
679
path : & [ Segment ] ,
680
680
span,
@@ -795,7 +795,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
795
795
let expected = kind. descr_expected ( ) ;
796
796
let msg = format ! ( "cannot find {} `{}` in this scope" , expected, ident) ;
797
797
let mut err = self . tcx . sess . struct_span_err ( ident. span , msg) ;
798
- self . unresolved_macro_suggestions ( & mut err, kind, & parent_scope, ident) ;
798
+ self . unresolved_macro_suggestions ( & mut err, kind, & parent_scope, ident, krate ) ;
799
799
err. emit ( ) ;
800
800
}
801
801
}
0 commit comments