@@ -50,6 +50,7 @@ use externalfiles::ExternalHtml;
50
50
51
51
use serialize:: json;
52
52
use serialize:: json:: ToJson ;
53
+ use syntax:: abi;
53
54
use syntax:: ast;
54
55
use syntax:: ast_util;
55
56
use rustc:: util:: nodemap:: NodeSet ;
@@ -1809,15 +1810,22 @@ fn assoc_type(w: &mut fmt::Formatter, it: &clean::Item,
1809
1810
}
1810
1811
1811
1812
fn render_method ( w : & mut fmt:: Formatter , meth : & clean:: Item ) -> fmt:: Result {
1812
- fn method ( w : & mut fmt:: Formatter , it : & clean:: Item , unsafety : ast:: Unsafety ,
1813
- g : & clean:: Generics , selfty : & clean:: SelfTy ,
1814
- d : & clean:: FnDecl ) -> fmt:: Result {
1815
- write ! ( w, "{}fn <a href='#{ty}.{name}' class='fnname'>{name}</a>\
1813
+ fn method ( w : & mut fmt:: Formatter , it : & clean:: Item ,
1814
+ unsafety : ast:: Unsafety , abi : abi:: Abi ,
1815
+ g : & clean:: Generics , selfty : & clean:: SelfTy ,
1816
+ d : & clean:: FnDecl ) -> fmt:: Result {
1817
+ use syntax:: abi:: Abi ;
1818
+
1819
+ write ! ( w, "{}{}fn <a href='#{ty}.{name}' class='fnname'>{name}</a>\
1816
1820
{generics}{decl}{where_clause}",
1817
1821
match unsafety {
1818
1822
ast:: Unsafety :: Unsafe => "unsafe " ,
1819
1823
_ => "" ,
1820
1824
} ,
1825
+ match abi {
1826
+ Abi :: Rust => String :: new( ) ,
1827
+ a => format!( "extern {} " , a. to_string( ) )
1828
+ } ,
1821
1829
ty = shortty( it) ,
1822
1830
name = it. name. as_ref( ) . unwrap( ) ,
1823
1831
generics = * g,
@@ -1826,10 +1834,10 @@ fn render_method(w: &mut fmt::Formatter, meth: &clean::Item) -> fmt::Result {
1826
1834
}
1827
1835
match meth. inner {
1828
1836
clean:: TyMethodItem ( ref m) => {
1829
- method ( w, meth, m. unsafety , & m. generics , & m. self_ , & m. decl )
1837
+ method ( w, meth, m. unsafety , m . abi , & m. generics , & m. self_ , & m. decl )
1830
1838
}
1831
1839
clean:: MethodItem ( ref m) => {
1832
- method ( w, meth, m. unsafety , & m. generics , & m. self_ , & m. decl )
1840
+ method ( w, meth, m. unsafety , m . abi , & m. generics , & m. self_ , & m. decl )
1833
1841
}
1834
1842
clean:: AssociatedTypeItem ( ref typ) => {
1835
1843
assoc_type ( w, meth, typ)
0 commit comments