Display negative trait implementations correctly in rustdoc
Added doc test
This commit is contained in:
parent
a0f86de497
commit
eb086505b8
5 changed files with 51 additions and 0 deletions
|
@ -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 => {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue