about summary refs log tree commit diff
path: root/src/rustdoc/attr_pass.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/rustdoc/attr_pass.rs')
-rw-r--r--src/rustdoc/attr_pass.rs14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/rustdoc/attr_pass.rs b/src/rustdoc/attr_pass.rs
index 0748f603580..92ab33e3614 100644
--- a/src/rustdoc/attr_pass.rs
+++ b/src/rustdoc/attr_pass.rs
@@ -221,11 +221,17 @@ fn merge_method_attrs(
             })
           }
           ast_map::node_item(@{
-            node: ast::item_impl(_, _, _, methods), _
+            node: ast::item_impl(_, _, _, methods_opt), _
           }, _) => {
-            vec::map(methods, |method| {
-                (to_str(method.ident), attr_parser::parse_desc(method.attrs))
-            })
+            match methods_opt {
+                None => ~[],
+                Some(methods) => {
+                    vec::map(methods, |method| {
+                        (to_str(method.ident),
+                         attr_parser::parse_desc(method.attrs))
+                    })
+                }
+            }
           }
           _ => fail ~"unexpected item"
         }