@@ -1061,7 +1061,7 @@ impl LinkCollector<'_, '_> {
1061
1061
// valid omission. See https://github.com/rust-lang/rust/pull/80660#discussion_r551585677
1062
1062
// for discussion on the matter.
1063
1063
let kind = self.cx.tcx.def_kind(id);
1064
- self.verify_disambiguator(path_str, kind, id, disambiguator, item, &diag_info)?;
1064
+ self.verify_disambiguator(path_str, kind, id, disambiguator, &diag_info)?;
1065
1065
} else {
1066
1066
match disambiguator {
1067
1067
Some(Disambiguator::Primitive | Disambiguator::Namespace(_)) | None => {}
@@ -1090,7 +1090,6 @@ impl LinkCollector<'_, '_> {
1090
1090
kind_for_dis,
1091
1091
id_for_dis,
1092
1092
disambiguator,
1093
- item,
1094
1093
&diag_info,
1095
1094
)?;
1096
1095
@@ -1111,7 +1110,6 @@ impl LinkCollector<'_, '_> {
1111
1110
kind: DefKind,
1112
1111
id: DefId,
1113
1112
disambiguator: Option<Disambiguator>,
1114
- item: &Item,
1115
1113
diag_info: &DiagnosticInfo<'_>,
1116
1114
) -> Option<()> {
1117
1115
debug!("intra-doc link to {path_str} resolved to {:?}", (kind, id));
@@ -1138,7 +1136,7 @@ impl LinkCollector<'_, '_> {
1138
1136
1139
1137
// item can be non-local e.g. when using `#[rustc_doc_primitive = "pointer"]`
1140
1138
if let Some((src_id, dst_id)) = id.as_local().and_then(|dst_id| {
1141
- item.item_id.expect_def_id().as_local().map(|src_id| (src_id, dst_id))
1139
+ diag_info. item.item_id.expect_def_id().as_local().map(|src_id| (src_id, dst_id))
1142
1140
}) {
1143
1141
if self.cx.tcx.effective_visibilities(()).is_exported(src_id)
1144
1142
&& !self.cx.tcx.effective_visibilities(()).is_exported(dst_id)
0 commit comments