1
Fork 0

Display negative trait implementations correctly in rustdoc

Added doc test
This commit is contained in:
Diggory Blake 2015-01-21 04:35:57 +00:00
parent a0f86de497
commit eb086505b8
5 changed files with 51 additions and 0 deletions

View file

@ -2085,6 +2085,10 @@ fn render_impl(w: &mut fmt::Formatter, i: &Impl) -> fmt::Result {
try!(write!(w, "<h3 class='impl'>{}<code>impl{} ",
ConciseStability(&i.stability),
i.impl_.generics));
match i.impl_.polarity {
Some(clean::ImplPolarity::Negative) => try!(write!(w, "!")),
_ => {}
}
match i.impl_.trait_ {
Some(ref ty) => try!(write!(w, "{} for ", *ty)),
None => {}