@@ -1073,7 +1073,7 @@ impl LinkCollector<'_, '_> {
1073
1073
// valid omission. See https://github.com/rust-lang/rust/pull/80660#discussion_r551585677
1074
1074
// for discussion on the matter.
1075
1075
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) ?;
1077
1077
} else {
1078
1078
match disambiguator {
1079
1079
Some ( Disambiguator :: Primitive | Disambiguator :: Namespace ( _) ) | None => { }
@@ -1102,7 +1102,6 @@ impl LinkCollector<'_, '_> {
1102
1102
kind_for_dis,
1103
1103
id_for_dis,
1104
1104
disambiguator,
1105
- item,
1106
1105
& diag_info,
1107
1106
) ?;
1108
1107
@@ -1123,7 +1122,6 @@ impl LinkCollector<'_, '_> {
1123
1122
kind : DefKind ,
1124
1123
id : DefId ,
1125
1124
disambiguator : Option < Disambiguator > ,
1126
- item : & Item ,
1127
1125
diag_info : & DiagnosticInfo < ' _ > ,
1128
1126
) -> Option < ( ) > {
1129
1127
debug ! ( "intra-doc link to {path_str} resolved to {:?}" , ( kind, id) ) ;
@@ -1150,7 +1148,7 @@ impl LinkCollector<'_, '_> {
1150
1148
1151
1149
// item can be non-local e.g. when using `#[rustc_doc_primitive = "pointer"]`
1152
1150
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) )
1154
1152
} ) {
1155
1153
if self . cx . tcx . effective_visibilities ( ( ) ) . is_exported ( src_id)
1156
1154
&& !self . cx . tcx . effective_visibilities ( ( ) ) . is_exported ( dst_id)
0 commit comments