diff options
| author | bors <bors@rust-lang.org> | 2015-03-29 11:12:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-03-29 11:12:26 +0000 |
| commit | ea03ad961669e69d57cb0ae1a48b53b4b49a8342 (patch) | |
| tree | b5b49e90b4214f73117c96d36070cc4cfd1d1517 | |
| parent | fa3d778626c394b3242fa161e35ccdecf055a3f1 (diff) | |
| parent | 8d6fb44c9950dbb89a4470e2050f8692b87debb3 (diff) | |
| download | rust-ea03ad961669e69d57cb0ae1a48b53b4b49a8342.tar.gz rust-ea03ad961669e69d57cb0ae1a48b53b4b49a8342.zip | |
Auto merge of #23809 - cmr:issue-21310, r=Manishearth
This isn't really possible to test in an automatic way, since the only traits you can negative impl are `Send` and `Sync`, and the implementors page for those only exists in libstd. Closes #21310
| -rw-r--r-- | src/librustdoc/html/render.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index b4375d76d59..179418174d9 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -125,6 +125,7 @@ pub struct Implementor { pub trait_: clean::Type, pub for_: clean::Type, pub stability: Option<clean::Stability>, + pub polarity: Option<clean::ImplPolarity>, } /// Metadata about implementations for a type. @@ -635,9 +636,11 @@ fn write_shared(cx: &Context, // going on). If they're in different crates then the crate defining // the trait will be interested in our implementation. if imp.def_id.krate == did.krate { continue } - try!(write!(&mut f, r#""{}impl{} {} for {}","#, + try!(write!(&mut f, r#""{}impl{} {}{} for {}","#, ConciseStability(&imp.stability), - imp.generics, imp.trait_, imp.for_)); + imp.generics, + if imp.polarity == Some(clean::ImplPolarity::Negative) { "!" } else { "" }, + imp.trait_, imp.for_)); } try!(writeln!(&mut f, r"];")); try!(writeln!(&mut f, "{}", r" @@ -882,6 +885,7 @@ impl DocFolder for Cache { trait_: i.trait_.as_ref().unwrap().clone(), for_: i.for_.clone(), stability: item.stability.clone(), + polarity: i.polarity.clone(), }); } Some(..) | None => {} |
