]> git.lizzy.rs Git - rust.git/commitdiff
Fixing rustdoc
authorSunjay Varma <varma.sunjay@gmail.com>
Tue, 26 Sep 2017 05:17:04 +0000 (01:17 -0400)
committerSunjay Varma <varma.sunjay@gmail.com>
Wed, 18 Oct 2017 02:14:14 +0000 (22:14 -0400)
src/librustdoc/clean/mod.rs

index e217978648efa21bc836f6aeeb8f9c905d67a62d..63e3c7edb95b10c17ae80754c1b5b1a95b89ffd7 100644 (file)
@@ -1140,13 +1140,13 @@ pub struct Method {
     pub abi: Abi,
 }
 
-impl<'a> Clean<Method> for (&'a hir::MethodSig, hir::BodyId) {
+impl<'a> Clean<Method> for (&'a hir::MethodSig, &'a hir::Generics, hir::BodyId) {
     fn clean(&self, cx: &DocContext) -> Method {
         Method {
-            generics: self.0.generics.clean(cx),
+            generics: self.1.clean(cx),
             unsafety: self.0.unsafety,
             constness: self.0.constness,
-            decl: (&*self.0.decl, self.1).clean(cx),
+            decl: (&*self.0.decl, self.2).clean(cx),
             abi: self.0.abi
         }
     }
@@ -1379,13 +1379,13 @@ fn clean(&self, cx: &DocContext) -> Item {
                                     default.map(|e| print_const_expr(cx, e)))
             }
             hir::TraitItemKind::Method(ref sig, hir::TraitMethod::Provided(body)) => {
-                MethodItem((sig, body).clean(cx))
+                MethodItem((sig, &self.generics, body).clean(cx))
             }
             hir::TraitItemKind::Method(ref sig, hir::TraitMethod::Required(ref names)) => {
                 TyMethodItem(TyMethod {
                     unsafety: sig.unsafety.clone(),
                     decl: (&*sig.decl, &names[..]).clean(cx),
-                    generics: sig.generics.clean(cx),
+                    generics: self.generics.clean(cx),
                     abi: sig.abi
                 })
             }
@@ -1414,7 +1414,7 @@ fn clean(&self, cx: &DocContext) -> Item {
                                     Some(print_const_expr(cx, expr)))
             }
             hir::ImplItemKind::Method(ref sig, body) => {
-                MethodItem((sig, body).clean(cx))
+                MethodItem((sig, &self.generics, body).clean(cx))
             }
             hir::ImplItemKind::Type(ref ty) => TypedefItem(Typedef {
                 type_: ty.clean(cx),