@@ -118,11 +118,8 @@ pub enum ExternalLocation {
118
118
/// Metadata about an implementor of a trait.
119
119
pub struct Implementor {
120
120
pub def_id : ast:: DefId ,
121
- pub generics : clean:: Generics ,
122
- pub trait_ : clean:: Type ,
123
- pub for_ : clean:: Type ,
124
121
pub stability : Option < clean:: Stability > ,
125
- pub polarity : Option < clean:: ImplPolarity > ,
122
+ pub impl_ : clean:: Impl ,
126
123
}
127
124
128
125
/// Metadata about implementations for a type.
@@ -644,10 +641,7 @@ fn write_shared(cx: &Context,
644
641
// going on). If they're in different crates then the crate defining
645
642
// the trait will be interested in our implementation.
646
643
if imp. def_id . krate == did. krate { continue }
647
- try!( write ! ( & mut f, r#""impl{} {}{} for {}","# ,
648
- imp. generics,
649
- if imp. polarity == Some ( clean:: ImplPolarity :: Negative ) { "!" } else { "" } ,
650
- imp. trait_, imp. for_) ) ;
644
+ try!( write ! ( & mut f, r#""{}","# , imp. impl_) ) ;
651
645
}
652
646
try!( writeln ! ( & mut f, r"];" ) ) ;
653
647
try!( writeln ! ( & mut f, "{}" , r"
@@ -888,11 +882,8 @@ impl DocFolder for Cache {
888
882
Some ( clean:: ResolvedPath { did, .. } ) => {
889
883
self . implementors . entry ( did) . or_insert ( vec ! [ ] ) . push ( Implementor {
890
884
def_id : item. def_id ,
891
- generics : i. generics . clone ( ) ,
892
- trait_ : i. trait_ . as_ref ( ) . unwrap ( ) . clone ( ) ,
893
- for_ : i. for_ . clone ( ) ,
894
885
stability : item. stability . clone ( ) ,
895
- polarity : i. polarity . clone ( ) ,
886
+ impl_ : i. clone ( ) ,
896
887
} ) ;
897
888
}
898
889
Some ( ..) | None => { }
@@ -1910,8 +1901,7 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
1910
1901
match cache. implementors . get ( & it. def_id ) {
1911
1902
Some ( implementors) => {
1912
1903
for i in implementors {
1913
- try!( writeln ! ( w, "<li><code>impl{} {} for {}{}</code></li>" ,
1914
- i. generics, i. trait_, i. for_, WhereClause ( & i. generics) ) ) ;
1904
+ try!( writeln ! ( w, "<li><code>{}</code></li>" , i. impl_) ) ;
1915
1905
}
1916
1906
}
1917
1907
None => { }
@@ -2335,16 +2325,7 @@ fn render_deref_methods(w: &mut fmt::Formatter, impl_: &Impl) -> fmt::Result {
2335
2325
fn render_impl ( w : & mut fmt:: Formatter , i : & Impl , link : AssocItemLink ,
2336
2326
render_header : bool ) -> fmt:: Result {
2337
2327
if render_header {
2338
- try!( write ! ( w, "<h3 class='impl'><code>impl{} " ,
2339
- i. impl_. generics) ) ;
2340
- if let Some ( clean:: ImplPolarity :: Negative ) = i. impl_ . polarity {
2341
- try!( write ! ( w, "!" ) ) ;
2342
- }
2343
- if let Some ( ref ty) = i. impl_ . trait_ {
2344
- try!( write ! ( w, "{} for " , * ty) ) ;
2345
- }
2346
- try!( write ! ( w, "{}{}</code></h3>" , i. impl_. for_,
2347
- WhereClause ( & i. impl_. generics) ) ) ;
2328
+ try!( write ! ( w, "<h3 class='impl'><code>{}</code></h3>" , i. impl_) ) ;
2348
2329
if let Some ( ref dox) = i. dox {
2349
2330
try!( write ! ( w, "<div class='docblock'>{}</div>" , Markdown ( dox) ) ) ;
2350
2331
}
0 commit comments