]> git.lizzy.rs Git - rust.git/commitdiff
rustdoc: Use csearch for impl loading
authorAlex Crichton <alex@alexcrichton.com>
Sat, 24 May 2014 02:31:13 +0000 (19:31 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Sun, 25 May 2014 08:18:10 +0000 (01:18 -0700)
The normal analysis passes aren't guaranteed to have loaded all impls, so use
the csearch methods directly to load impls.

src/librustdoc/clean.rs

index a78e9d1d1fb0c4c4f037974f6b2598034d748a0f..4ba59647063eeff1ecd29bfeadf2241c36e97019 100644 (file)
@@ -1961,7 +1961,7 @@ fn build_impl(tcx: &ty::ctxt, did: ast::DefId) -> Item {
     let associated_trait = csearch::get_impl_trait(tcx, did);
     let attrs = load_attrs(tcx, did);
     let ty = ty::lookup_item_type(tcx, did);
-    let methods = tcx.impl_methods.borrow().get(&did).iter().map(|did| {
+    let methods = csearch::get_impl_methods(&tcx.sess.cstore, did).iter().map(|did| {
         let mut item = match ty::method(tcx, *did).clean() {
             Provided(item) => item,
             Required(item) => item,