@@ -1725,7 +1725,10 @@ fn print_item(cx: &Context, item: &clean::Item, buf: &mut Buffer, cache: &Cache)
17251725 "Module "
17261726 }
17271727 }
1728- clean:: FunctionItem ( ..) | clean:: ForeignFunctionItem ( ..) => "Function " ,
1728+ clean:: FunctionItem ( ..)
1729+ | clean:: ForeignFunctionItem ( ..)
1730+ | clean:: TyMethodItem ( ..)
1731+ | clean:: MethodItem ( ..) => "Function " ,
17291732 clean:: TraitItem ( ..) => "Trait " ,
17301733 clean:: StructItem ( ..) => "Struct " ,
17311734 clean:: UnionItem ( ..) => "Union " ,
@@ -1746,7 +1749,7 @@ fn print_item(cx: &Context, item: &clean::Item, buf: &mut Buffer, cache: &Cache)
17461749 clean:: TraitAliasItem ( ..) => "Trait Alias " ,
17471750 _ => {
17481751 // We don't generate pages for any other type.
1749- unreachable ! ( ) ;
1752+ unreachable ! ( "unknown kind {:?}" , item . kind ) ;
17501753 }
17511754 } ;
17521755 buf. write_str ( name) ;
@@ -1768,9 +1771,10 @@ fn print_item(cx: &Context, item: &clean::Item, buf: &mut Buffer, cache: &Cache)
17681771
17691772 match item. kind {
17701773 clean:: ModuleItem ( ref m) => item_module ( buf, cx, item, & m. items ) ,
1771- clean:: FunctionItem ( ref f) | clean:: ForeignFunctionItem ( ref f) => {
1772- item_function ( buf, cx, item, f)
1773- }
1774+ clean:: FunctionItem ( ref f)
1775+ | clean:: ForeignFunctionItem ( ref f)
1776+ | clean:: TyMethodItem ( ref f)
1777+ | clean:: MethodItem ( ref f, _) => item_function ( buf, cx, item, f) ,
17741778 clean:: TraitItem ( ref t) => item_trait ( buf, cx, item, t, cache) ,
17751779 clean:: StructItem ( ref s) => item_struct ( buf, cx, item, s, cache) ,
17761780 clean:: UnionItem ( ref s) => item_union ( buf, cx, item, s, cache) ,
@@ -1787,7 +1791,7 @@ fn print_item(cx: &Context, item: &clean::Item, buf: &mut Buffer, cache: &Cache)
17871791 clean:: TraitAliasItem ( ref ta) => item_trait_alias ( buf, cx, item, ta, cache) ,
17881792 _ => {
17891793 // We don't generate pages for any other type.
1790- unreachable ! ( ) ;
1794+ unreachable ! ( "unknown kind {:?}" , item . kind ) ;
17911795 }
17921796 }
17931797}
0 commit comments