From bcb5c6fe5fed032fd8ef6b2308a7ff61b1eeca71 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 21 Jul 2018 23:14:37 +0200 Subject: [PATCH] Fix urls --- src/librustdoc/clean/auto_trait.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/librustdoc/clean/auto_trait.rs b/src/librustdoc/clean/auto_trait.rs index 1fcedb3b5d28..4246c8b555ac 100644 --- a/src/librustdoc/clean/auto_trait.rs +++ b/src/librustdoc/clean/auto_trait.rs @@ -114,8 +114,7 @@ impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> { name: Option, ) -> Vec where F: Fn(DefId) -> Def { - if !self.cx.access_levels.borrow().is_doc_reachable(def_id) || - self.cx + if self.cx .tcx .get_attrs(def_id) .lists("doc") @@ -134,7 +133,8 @@ impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> { let ty = self.cx.tcx.type_of(def_id); let mut traits = Vec::new(); - if self.cx.crate_name != Some("core".to_string()) { + if self.cx.crate_name != Some("core".to_string()) && + self.cx.access_levels.borrow().is_doc_reachable(def_id) { if let ty::TyAdt(_adt, _) = ty.sty { let real_name = name.clone().map(|name| Ident::from_str(&name)); let param_env = self.cx.tcx.param_env(def_id); @@ -191,7 +191,7 @@ impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> { ref_id: ast::DUMMY_NODE_ID, }; let provided_trait_methods = - infcx.tcx.provided_trait_methods(impl_def_id) + infcx.tcx.provided_trait_methods(trait_def_id) .into_iter() .map(|meth| meth.ident.to_string()) .collect();