@@ -1073,7 +1073,7 @@ impl LinkCollector<'_, '_> {
10731073                    // valid omission. See https://github.com/rust-lang/rust/pull/80660#discussion_r551585677 
10741074                    // for discussion on the matter. 
10751075                    let  kind = self . cx . tcx . def_kind ( id) ; 
1076-                     self . verify_disambiguator ( path_str,  kind,  id,  disambiguator,  item ,   & diag_info) ?; 
1076+                     self . verify_disambiguator ( path_str,  kind,  id,  disambiguator,  & diag_info) ?; 
10771077                }  else  { 
10781078                    match  disambiguator { 
10791079                        Some ( Disambiguator :: Primitive  | Disambiguator :: Namespace ( _) )  | None  => { } 
@@ -1102,7 +1102,6 @@ impl LinkCollector<'_, '_> {
11021102                    kind_for_dis, 
11031103                    id_for_dis, 
11041104                    disambiguator, 
1105-                     item, 
11061105                    & diag_info, 
11071106                ) ?; 
11081107
@@ -1123,7 +1122,6 @@ impl LinkCollector<'_, '_> {
11231122        kind :  DefKind , 
11241123        id :  DefId , 
11251124        disambiguator :  Option < Disambiguator > , 
1126-         item :  & Item , 
11271125        diag_info :  & DiagnosticInfo < ' _ > , 
11281126    )  -> Option < ( ) >  { 
11291127        debug ! ( "intra-doc link to {path_str} resolved to {:?}" ,  ( kind,  id) ) ; 
@@ -1150,7 +1148,7 @@ impl LinkCollector<'_, '_> {
11501148
11511149        // item can be non-local e.g. when using `#[rustc_doc_primitive = "pointer"]` 
11521150        if  let  Some ( ( src_id,  dst_id) )  = id. as_local ( ) . and_then ( |dst_id| { 
1153-             item. item_id . expect_def_id ( ) . as_local ( ) . map ( |src_id| ( src_id,  dst_id) ) 
1151+             diag_info . item . item_id . expect_def_id ( ) . as_local ( ) . map ( |src_id| ( src_id,  dst_id) ) 
11541152        } )  { 
11551153            if  self . cx . tcx . effective_visibilities ( ( ) ) . is_exported ( src_id) 
11561154                && !self . cx . tcx . effective_visibilities ( ( ) ) . is_exported ( dst_id) 
0 commit comments