We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c82e5e commit eae2026Copy full SHA for eae2026
src/librustdoc/clean/mod.rs
@@ -1204,7 +1204,16 @@ impl Clean<Item> for ty::AssocItem {
1204
}
1205
};
1206
1207
- Item::from_def_id_and_parts(self.def_id, Some(self.name), kind, cx)
+ let mut output = Item::from_def_id_and_parts(self.def_id, Some(self.name), kind, cx);
1208
+
1209
+ // HACK: Override visibility for items in a trait implementation to match HIR
1210
+ let impl_ref = tcx.parent(self.def_id).and_then(|did| tcx.impl_trait_ref(did));
1211
1212
+ if impl_ref.is_some() {
1213
+ output.visibility = Visibility::Inherited;
1214
+ }
1215
1216
+ output
1217
1218
1219
0 commit comments