Skip to content

Commit bcb5c6f

Browse files
Fix urls
1 parent 8fa6e3f commit bcb5c6f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustdoc/clean/auto_trait.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> {
114114
name: Option<String>,
115115
) -> Vec<Item>
116116
where F: Fn(DefId) -> Def {
117-
if !self.cx.access_levels.borrow().is_doc_reachable(def_id) ||
118-
self.cx
117+
if self.cx
119118
.tcx
120119
.get_attrs(def_id)
121120
.lists("doc")
@@ -134,7 +133,8 @@ impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> {
134133

135134
let ty = self.cx.tcx.type_of(def_id);
136135
let mut traits = Vec::new();
137-
if self.cx.crate_name != Some("core".to_string()) {
136+
if self.cx.crate_name != Some("core".to_string()) &&
137+
self.cx.access_levels.borrow().is_doc_reachable(def_id) {
138138
if let ty::TyAdt(_adt, _) = ty.sty {
139139
let real_name = name.clone().map(|name| Ident::from_str(&name));
140140
let param_env = self.cx.tcx.param_env(def_id);
@@ -191,7 +191,7 @@ impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> {
191191
ref_id: ast::DUMMY_NODE_ID,
192192
};
193193
let provided_trait_methods =
194-
infcx.tcx.provided_trait_methods(impl_def_id)
194+
infcx.tcx.provided_trait_methods(trait_def_id)
195195
.into_iter()
196196
.map(|meth| meth.ident.to_string())
197197
.collect();

0 commit comments

Comments
 (0)