We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dbfed2c commit 090dbb1Copy full SHA for 090dbb1
src/librustdoc/passes/strip_aliased_non_local.rs
@@ -46,8 +46,13 @@ impl<'tcx> DocFolder for NonLocalStripper<'tcx> {
46
// the field and not the one given by the user for the currrent crate.
47
//
48
// FIXME(#125009): Not-local should probably consider same Cargo workspace
49
- if !i.def_id().map_or(true, |did| did.is_local()) {
50
- if i.visibility(self.tcx) != Some(Visibility::Public) || i.is_doc_hidden() {
+ if let Some(def_id) = i.def_id()
+ && !def_id.is_local()
51
+ {
52
+ if i.is_doc_hidden()
53
+ // Default to *not* stripping items with inherited visibility.
54
+ || i.visibility(self.tcx).map_or(false, |viz| viz != Visibility::Public)
55
56
return Some(strip_item(i));
57
}
58
0 commit comments