Skip to content

Commit c9b4d1b

Browse files
Remove unneeded argument of LinkCollector::verify_disambiguator
1 parent 126cb9b commit c9b4d1b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/librustdoc/passes/collect_intra_doc_links.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ impl LinkCollector<'_, '_> {
10611061
// valid omission. See https://github.com/rust-lang/rust/pull/80660#discussion_r551585677
10621062
// for discussion on the matter.
10631063
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)?;
10651065
} else {
10661066
match disambiguator {
10671067
Some(Disambiguator::Primitive | Disambiguator::Namespace(_)) | None => {}
@@ -1090,7 +1090,6 @@ impl LinkCollector<'_, '_> {
10901090
kind_for_dis,
10911091
id_for_dis,
10921092
disambiguator,
1093-
item,
10941093
&diag_info,
10951094
)?;
10961095

@@ -1111,7 +1110,6 @@ impl LinkCollector<'_, '_> {
11111110
kind: DefKind,
11121111
id: DefId,
11131112
disambiguator: Option<Disambiguator>,
1114-
item: &Item,
11151113
diag_info: &DiagnosticInfo<'_>,
11161114
) -> Option<()> {
11171115
debug!("intra-doc link to {path_str} resolved to {:?}", (kind, id));
@@ -1138,7 +1136,7 @@ impl LinkCollector<'_, '_> {
11381136

11391137
// item can be non-local e.g. when using `#[rustc_doc_primitive = "pointer"]`
11401138
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))
11421140
}) {
11431141
if self.cx.tcx.effective_visibilities(()).is_exported(src_id)
11441142
&& !self.cx.tcx.effective_visibilities(()).is_exported(dst_id)

0 commit comments

Comments
 (0)