diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-09-23 22:25:43 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-09-23 23:01:49 -0700 |
| commit | afd91f8a5698e7767ddfbf90c665c08dcd4f0de0 (patch) | |
| tree | 3bc5d52fd888c010ea797f6570c92abe861c183a /src/rustdoc | |
| parent | 2dae768624de87bcec1160bd29c27af1affe7f5f (diff) | |
| download | rust-afd91f8a5698e7767ddfbf90c665c08dcd4f0de0.tar.gz rust-afd91f8a5698e7767ddfbf90c665c08dcd4f0de0.zip | |
Register snapshots. Remove redundant Eq impls, Makefile hacks
Diffstat (limited to 'src/rustdoc')
| -rw-r--r-- | src/rustdoc/config.rs | 18 | ||||
| -rw-r--r-- | src/rustdoc/doc.rs | 258 |
2 files changed, 0 insertions, 276 deletions
diff --git a/src/rustdoc/config.rs b/src/rustdoc/config.rs index 383b002110a..b95e1657043 100644 --- a/src/rustdoc/config.rs +++ b/src/rustdoc/config.rs @@ -18,15 +18,6 @@ enum OutputFormat { PandocHtml } -#[cfg(stage0)] -impl OutputFormat : cmp::Eq { - pure fn eq(&&other: OutputFormat) -> bool { - (self as uint) == (other as uint) - } - pure fn ne(&&other: OutputFormat) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl OutputFormat : cmp::Eq { pure fn eq(other: &OutputFormat) -> bool { (self as uint) == ((*other) as uint) @@ -42,15 +33,6 @@ enum OutputStyle { DocPerMod } -#[cfg(stage0)] -impl OutputStyle : cmp::Eq { - pure fn eq(&&other: OutputStyle) -> bool { - (self as uint) == (other as uint) - } - pure fn ne(&&other: OutputStyle) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl OutputStyle : cmp::Eq { pure fn eq(other: &OutputStyle) -> bool { (self as uint) == ((*other) as uint) diff --git a/src/rustdoc/doc.rs b/src/rustdoc/doc.rs index a9426ee9ffd..82bddf11d16 100644 --- a/src/rustdoc/doc.rs +++ b/src/rustdoc/doc.rs @@ -6,15 +6,6 @@ type Doc_ = { pages: ~[Page] }; -#[cfg(stage0)] -impl Doc_ : cmp::Eq { - pure fn eq(&&other: Doc_) -> bool { - self.pages == other.pages - } - pure fn ne(&&other: Doc_) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl Doc_ : cmp::Eq { pure fn eq(other: &Doc_) -> bool { self.pages == (*other).pages @@ -26,13 +17,6 @@ enum Doc { Doc_(Doc_) } -#[cfg(stage0)] -impl Doc : cmp::Eq { - pure fn eq(&&other: Doc) -> bool { *self == *other } - pure fn ne(&&other: Doc) -> bool { *self != *other } -} -#[cfg(stage1)] -#[cfg(stage2)] impl Doc : cmp::Eq { pure fn eq(other: &Doc) -> bool { *self == *(*other) } pure fn ne(other: &Doc) -> bool { *self != *(*other) } @@ -43,28 +27,6 @@ enum Page { ItemPage(ItemTag) } -#[cfg(stage0)] -impl Page : cmp::Eq { - pure fn eq(&&other: Page) -> bool { - match self { - CratePage(e0a) => { - match other { - CratePage(e0b) => e0a == e0b, - _ => false - } - } - ItemPage(e0a) => { - match other { - ItemPage(e0b) => e0a == e0b, - _ => false - } - } - } - } - pure fn ne(&&other: Page) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl Page : cmp::Eq { pure fn eq(other: &Page) -> bool { match self { @@ -90,15 +52,6 @@ enum Implementation { Provided, } -#[cfg(stage0)] -impl Implementation : cmp::Eq { - pure fn eq(&&other: Implementation) -> bool { - (self as uint) == (other as uint) - } - pure fn ne(&&other: Implementation) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl Implementation : cmp::Eq { pure fn eq(other: &Implementation) -> bool { (self as uint) == ((*other) as uint) @@ -116,15 +69,6 @@ type Section = { body: ~str }; -#[cfg(stage0)] -impl Section : cmp::Eq { - pure fn eq(&&other: Section) -> bool { - self.header == other.header && self.body == other.body - } - pure fn ne(&&other: Section) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl Section : cmp::Eq { pure fn eq(other: &Section) -> bool { self.header == (*other).header && self.body == (*other).body @@ -139,15 +83,6 @@ type CrateDoc = { topmod: ModDoc, }; -#[cfg(stage0)] -impl CrateDoc : cmp::Eq { - pure fn eq(&&other: CrateDoc) -> bool { - self.topmod == other.topmod - } - pure fn ne(&&other: CrateDoc) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl CrateDoc : cmp::Eq { pure fn eq(other: &CrateDoc) -> bool { self.topmod == (*other).topmod @@ -167,70 +102,6 @@ enum ItemTag { StructTag(StructDoc) } -#[cfg(stage0)] -impl ItemTag : cmp::Eq { - pure fn eq(&&other: ItemTag) -> bool { - match self { - ModTag(e0a) => { - match other { - ModTag(e0b) => e0a == e0b, - _ => false - } - } - NmodTag(e0a) => { - match other { - NmodTag(e0b) => e0a == e0b, - _ => false - } - } - ConstTag(e0a) => { - match other { - ConstTag(e0b) => e0a == e0b, - _ => false - } - } - FnTag(e0a) => { - match other { - FnTag(e0b) => e0a == e0b, - _ => false - } - } - EnumTag(e0a) => { - match other { - EnumTag(e0b) => e0a == e0b, - _ => false - } - } - TraitTag(e0a) => { - match other { - TraitTag(e0b) => e0a == e0b, - _ => false - } - } - ImplTag(e0a) => { - match other { - ImplTag(e0b) => e0a == e0b, - _ => false - } - } - TyTag(e0a) => { - match other { - TyTag(e0b) => e0a == e0b, - _ => false - } - } - StructTag(e0a) => { - match other { - StructTag(e0b) => e0a == e0b, - _ => false - } - } - } - } - pure fn ne(&&other: ItemTag) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl ItemTag : cmp::Eq { pure fn eq(other: &ItemTag) -> bool { match self { @@ -304,21 +175,6 @@ type ItemDoc = { reexport: bool }; -#[cfg(stage0)] -impl ItemDoc : cmp::Eq { - pure fn eq(&&other: ItemDoc) -> bool { - self.id == other.id && - self.name == other.name && - self.path == other.path && - self.brief == other.brief && - self.desc == other.desc && - self.sections == other.sections && - self.reexport == other.reexport - } - pure fn ne(&&other: ItemDoc) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl ItemDoc : cmp::Eq { pure fn eq(other: &ItemDoc) -> bool { self.id == (*other).id && @@ -337,15 +193,6 @@ type SimpleItemDoc = { sig: Option<~str> }; -#[cfg(stage0)] -impl SimpleItemDoc : cmp::Eq { - pure fn eq(&&other: SimpleItemDoc) -> bool { - self.item == other.item && self.sig == other.sig - } - pure fn ne(&&other: SimpleItemDoc) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl SimpleItemDoc : cmp::Eq { pure fn eq(other: &SimpleItemDoc) -> bool { self.item == (*other).item && self.sig == (*other).sig @@ -359,17 +206,6 @@ type ModDoc_ = { index: Option<Index> }; -#[cfg(stage0)] -impl ModDoc_ : cmp::Eq { - pure fn eq(&&other: ModDoc_) -> bool { - self.item == other.item && - self.items == other.items && - self.index == other.index - } - pure fn ne(&&other: ModDoc_) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl ModDoc_ : cmp::Eq { pure fn eq(other: &ModDoc_) -> bool { self.item == (*other).item && @@ -383,13 +219,6 @@ enum ModDoc { ModDoc_(ModDoc_) } -#[cfg(stage0)] -impl ModDoc : cmp::Eq { - pure fn eq(&&other: ModDoc) -> bool { *self == *other } - pure fn ne(&&other: ModDoc) -> bool { *self != *other } -} -#[cfg(stage1)] -#[cfg(stage2)] impl ModDoc : cmp::Eq { pure fn eq(other: &ModDoc) -> bool { *self == *(*other) } pure fn ne(other: &ModDoc) -> bool { *self != *(*other) } @@ -401,17 +230,6 @@ type NmodDoc = { index: Option<Index> }; -#[cfg(stage0)] -impl NmodDoc : cmp::Eq { - pure fn eq(&&other: NmodDoc) -> bool { - self.item == other.item && - self.fns == other.fns && - self.index == other.index - } - pure fn ne(&&other: NmodDoc) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl NmodDoc : cmp::Eq { pure fn eq(other: &NmodDoc) -> bool { self.item == (*other).item && @@ -430,15 +248,6 @@ type EnumDoc = { variants: ~[VariantDoc] }; -#[cfg(stage0)] -impl EnumDoc : cmp::Eq { - pure fn eq(&&other: EnumDoc) -> bool { - self.item == other.item && self.variants == other.variants - } - pure fn ne(&&other: EnumDoc) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl EnumDoc : cmp::Eq { pure fn eq(other: &EnumDoc) -> bool { self.item == (*other).item && self.variants == (*other).variants @@ -452,17 +261,6 @@ type VariantDoc = { sig: Option<~str> }; -#[cfg(stage0)] -impl VariantDoc : cmp::Eq { - pure fn eq(&&other: VariantDoc) -> bool { - self.name == other.name && - self.desc == other.desc && - self.sig == other.sig - } - pure fn ne(&&other: VariantDoc) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl VariantDoc : cmp::Eq { pure fn eq(other: &VariantDoc) -> bool { self.name == (*other).name && @@ -477,15 +275,6 @@ type TraitDoc = { methods: ~[MethodDoc] }; -#[cfg(stage0)] -impl TraitDoc : cmp::Eq { - pure fn eq(&&other: TraitDoc) -> bool { - self.item == other.item && self.methods == other.methods - } - pure fn ne(&&other: TraitDoc) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl TraitDoc : cmp::Eq { pure fn eq(other: &TraitDoc) -> bool { self.item == (*other).item && self.methods == (*other).methods @@ -502,20 +291,6 @@ type MethodDoc = { implementation: Implementation, }; -#[cfg(stage0)] -impl MethodDoc : cmp::Eq { - pure fn eq(&&other: MethodDoc) -> bool { - self.name == other.name && - self.brief == other.brief && - self.desc == other.desc && - self.sections == other.sections && - self.sig == other.sig && - self.implementation == other.implementation - } - pure fn ne(&&other: MethodDoc) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl MethodDoc : cmp::Eq { pure fn eq(other: &MethodDoc) -> bool { self.name == (*other).name && @@ -535,18 +310,6 @@ type ImplDoc = { methods: ~[MethodDoc] }; -#[cfg(stage0)] -impl ImplDoc : cmp::Eq { - pure fn eq(&&other: ImplDoc) -> bool { - self.item == other.item && - self.trait_types == other.trait_types && - self.self_ty == other.self_ty && - self.methods == other.methods - } - pure fn ne(&&other: ImplDoc) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl ImplDoc : cmp::Eq { pure fn eq(other: &ImplDoc) -> bool { self.item == (*other).item && @@ -578,15 +341,6 @@ type Index = { entries: ~[IndexEntry] }; -#[cfg(stage0)] -impl Index : cmp::Eq { - pure fn eq(&&other: Index) -> bool { - self.entries == other.entries - } - pure fn ne(&&other: Index) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl Index : cmp::Eq { pure fn eq(other: &Index) -> bool { self.entries == (*other).entries @@ -611,18 +365,6 @@ type IndexEntry = { link: ~str }; -#[cfg(stage0)] -impl IndexEntry : cmp::Eq { - pure fn eq(&&other: IndexEntry) -> bool { - self.kind == other.kind && - self.name == other.name && - self.brief == other.brief && - self.link == other.link - } - pure fn ne(&&other: IndexEntry) -> bool { !self.eq(other) } -} -#[cfg(stage1)] -#[cfg(stage2)] impl IndexEntry : cmp::Eq { pure fn eq(other: &IndexEntry) -> bool { self.kind == (*other).kind && |
