Update src/librustdoc/passes/collect_intra_doc_links.rs

Co-authored-by: Joshua Nelson <joshua@yottadb.com>
This commit is contained in:
Lucas De Angelis 2021-02-26 23:48:45 +01:00 committed by GitHub
parent d95b7b31c7
commit 02cc85065e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -838,7 +838,7 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> {
debug!("looking for the `Self` type");
let self_id = if item.is_fake() {
None
// Checking if the item is a field in a variant in an enum
// Checking if the item is a field in an enum variant
} else if (matches!(self.cx.tcx.def_kind(item.def_id), DefKind::Field)
&& matches!(
self.cx.tcx.def_kind(self.cx.tcx.parent(item.def_id).unwrap()),