]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #22765 - sanxiyn:dedup-rustdoc, r=alexcrichton
authorbors <bors@rust-lang.org>
Fri, 27 Feb 2015 02:58:15 +0000 (02:58 +0000)
committerbors <bors@rust-lang.org>
Fri, 27 Feb 2015 02:58:15 +0000 (02:58 +0000)
rustdoc impl item did not include default methods for local crates, but did include them for external crates. This resulted in duplicate methods. Fix so that impl item does not include default methods for external crates.

Fix #22595.

1  2 
src/librustdoc/clean/inline.rs

index 24b9d03400cb32275d92e2ae02683c49e55e0e3c,2bf623b2761e9de6ddcea813a97a167aea76fbb8..2bb4424822a4749c5b58b3537fee5d09cb860823
@@@ -46,7 -46,7 +46,7 @@@ pub fn try_inline(cx: &DocContext, id: 
          None => return None,
      };
      let def = match tcx.def_map.borrow().get(&id) {
 -        Some(def) => *def,
 +        Some(d) => d.full_def(),
          None => return None,
      };
      let did = def.def_id();
@@@ -308,6 -308,9 +308,9 @@@ fn build_impl(cx: &DocContext, tcx: &ty
                  if method.vis != ast::Public && associated_trait.is_none() {
                      return None
                  }
+                 if method.provided_source.is_some() {
+                     return None
+                 }
                  let mut item = method.clean(cx);
                  item.inner = match item.inner.clone() {
                      clean::TyMethodItem(clean::TyMethod {