@@ -125,6 +125,7 @@ pub struct Implementor {
125
125
pub trait_ : clean:: Type ,
126
126
pub for_ : clean:: Type ,
127
127
pub stability : Option < clean:: Stability > ,
128
+ pub polarity : Option < clean:: ImplPolarity > ,
128
129
}
129
130
130
131
/// Metadata about implementations for a type.
@@ -635,9 +636,11 @@ fn write_shared(cx: &Context,
635
636
// going on). If they're in different crates then the crate defining
636
637
// the trait will be interested in our implementation.
637
638
if imp. def_id . krate == did. krate { continue }
638
- try!( write ! ( & mut f, r#""{}impl{} {} for {}","# ,
639
+ try!( write ! ( & mut f, r#""{}impl{} {}{} for {}","# ,
639
640
ConciseStability ( & imp. stability) ,
640
- imp. generics, imp. trait_, imp. for_) ) ;
641
+ imp. generics,
642
+ if imp. polarity == Some ( clean:: ImplPolarity :: Negative ) { "!" } else { "" } ,
643
+ imp. trait_, imp. for_) ) ;
641
644
}
642
645
try!( writeln ! ( & mut f, r"];" ) ) ;
643
646
try!( writeln ! ( & mut f, "{}" , r"
@@ -882,6 +885,7 @@ impl DocFolder for Cache {
882
885
trait_ : i. trait_ . as_ref ( ) . unwrap ( ) . clone ( ) ,
883
886
for_ : i. for_ . clone ( ) ,
884
887
stability : item. stability . clone ( ) ,
888
+ polarity : i. polarity . clone ( ) ,
885
889
} ) ;
886
890
}
887
891
Some ( ..) | None => { }
0 commit comments