@@ -885,7 +885,6 @@ impl<'ast, 'ra, 'tcx> Visitor<'ast> for LateResolutionVisitor<'_, 'ast, 'ra, 'tc
885885 TypeNS ,
886886 Some ( Finalize :: new ( ty. id , ty. span ) ) ,
887887 None ,
888- None ,
889888 )
890889 . map_or ( Res :: Err , |d| d. res ( ) ) ;
891890 self . r . record_partial_res ( ty. id , PartialRes :: new ( res) ) ;
@@ -1458,7 +1457,7 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
14581457 None ,
14591458 & self . ribs [ ns] ,
14601459 None ,
1461- None ,
1460+ Some ( & self . diag_metadata ) ,
14621461 )
14631462 }
14641463
@@ -1468,7 +1467,6 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
14681467 ns : Namespace ,
14691468 finalize : Option < Finalize > ,
14701469 ignore_binding : Option < NameBinding < ' ra > > ,
1471- diag_metadata : Option < & crate :: late:: DiagMetadata < ' _ > > ,
14721470 ) -> Option < LexicalScopeBinding < ' ra > > {
14731471 self . r . resolve_ident_in_lexical_scope (
14741472 ident,
@@ -1477,7 +1475,7 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
14771475 finalize,
14781476 & self . ribs [ ns] ,
14791477 ignore_binding,
1480- diag_metadata,
1478+ Some ( & self . diag_metadata ) ,
14811479 )
14821480 }
14831481
@@ -2556,8 +2554,8 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
25562554 report_error ( self , ns) ;
25572555 }
25582556 Some ( LexicalScopeBinding :: Item ( binding) ) => {
2559- if let Some ( LexicalScopeBinding :: Res ( ..) ) = self
2560- . resolve_ident_in_lexical_scope ( ident, ns, None , Some ( binding) , None )
2557+ if let Some ( LexicalScopeBinding :: Res ( ..) ) =
2558+ self . resolve_ident_in_lexical_scope ( ident, ns, None , Some ( binding) )
25612559 {
25622560 report_error ( self , ns) ;
25632561 }
@@ -5110,7 +5108,7 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
51105108 // use the type namespace
51115109 let ns = if i + 1 == path. len ( ) { ns } else { TypeNS } ;
51125110 let res = self . r . partial_res_map . get ( & seg. id ?) ?. full_res ( ) ?;
5113- let binding = self . resolve_ident_in_lexical_scope ( seg. ident , ns, None , None , None ) ?;
5111+ let binding = self . resolve_ident_in_lexical_scope ( seg. ident , ns, None , None ) ?;
51145112 ( res == binding. res ( ) ) . then_some ( ( seg, binding) )
51155113 } ) ;
51165114
0 commit comments