]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/html/format.rs
rustdoc: Fill in external trait methods
[rust.git] / src / librustdoc / html / format.rs
index 563da5318f7c13f1e67d2cccd3340e6aa3a404b5..948d47b2eaf7e25d20f27c7712e36d57b44b7d79 100644 (file)
@@ -284,11 +284,15 @@ fn tybounds(w: &mut fmt::Formatter,
 impl fmt::Show for clean::Type {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         match *self {
-            clean::TyParamBinder(id) | clean::Generic(id) => {
+            clean::TyParamBinder(id) => {
                 let m = cache_key.get().unwrap();
-                f.write(m.typarams.get(&id).as_bytes())
+                f.write(m.typarams.get(&ast_util::local_def(id)).as_bytes())
             }
-            clean::ResolvedPath{ did, ref typarams, ref path} => {
+            clean::Generic(did) => {
+                let m = cache_key.get().unwrap();
+                f.write(m.typarams.get(&did).as_bytes())
+            }
+            clean::ResolvedPath{ did, ref typarams, ref path } => {
                 try!(resolved_path(f, did, path, false));
                 tybounds(f, typarams)
             }