pull extra::{serialize, ebml} into a separate libserialize crate

- `extra::json` didn't make the cut, because of `extra::json` required
   dep on `extra::TreeMap`. If/when `extra::TreeMap` moves out of `extra`,
   then `extra::json` could move into `serialize`
- `libextra`, `libsyntax` and `librustc` depend on the newly created
  `libserialize`
- The extensions to various `extra` types like `DList`, `RingBuf`, `TreeMap`
  and `TreeSet` for `Encodable`/`Decodable` were moved into the respective
  modules in `extra`
- There is some trickery, evident in `src/libextra/lib.rs` where a stub
  of `extra::serialize` is set up (in `src/libextra/serialize.rs`) for
  use in the stage0 build, where the snapshot rustc is still making
  deriving for `Encodable` and `Decodable` point at extra. Big props to
  @huonw for help working out the re-export solution for this

extra: inline extra::serialize stub

fix stuff clobbered in rebase + don't reexport serialize::serialize

no more globs in libserialize

syntax: fix import of libserialize traits

librustc: fix bad imports in encoder/decoder

add serialize dep to librustdoc

fix failing run-pass tests w/ serialize dep

adjust uuid dep

more rebase de-clobbering for libserialize

fixing tests, pushing libextra dep into cfg(test)

fix doc code in extra::json

adjust index.md links to serialize and uuid library
This commit is contained in:
Jeff Olson 2014-02-05 08:52:54 -08:00
parent 2bf575c86f
commit b8852e89ce
30 changed files with 259 additions and 193 deletions

View file

@ -22,7 +22,7 @@ use std::hashmap::HashMap;
use std::option::Option;
use std::rc::Rc;
use std::to_str::ToStr;
use extra::serialize::{Encodable, Decodable, Encoder, Decoder};
use serialize::{Encodable, Decodable, Encoder, Decoder};
/// A pointer abstraction. FIXME(eddyb) #10676 use Rc<T> in the future.
pub type P<T> = @T;
@ -1204,6 +1204,7 @@ pub enum InlinedItem {
#[cfg(test)]
mod test {
use serialize;
use extra;
use codemap::*;
use super::*;
@ -1230,6 +1231,6 @@ mod test {
},
};
// doesn't matter which encoder we use....
let _f = (@e as @extra::serialize::Encodable<extra::json::Encoder>);
let _f = (@e as @serialize::Encodable<extra::json::Encoder>);
}
}