about summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-02-05 10:41:34 -0800
committerbors <bors@rust-lang.org>2014-02-05 10:41:34 -0800
commit55684ba13fb97b8658108fd18baecc3c4c51beb0 (patch)
tree436f978485e7ceb1fc7daa36ab999afcdea30193 /src/libsyntax/ext
parent2bf575c86fd3c053df83b90862441fec71c7a622 (diff)
parentb8852e89ced0a0cdf66963aba08382ff18fd2d4b (diff)
downloadrust-55684ba13fb97b8658108fd18baecc3c4c51beb0.tar.gz
rust-55684ba13fb97b8658108fd18baecc3c4c51beb0.zip
auto merge of #11984 : olsonjeffery/rust/libserialize, r=alexcrichton
- `extra::json` didn't make the cut, because of `extra::json`'s required
   dep on `extra::TreeMap`. If/when `extra::TreeMap` moves out of `extra`,
   then `extra::json` could move into `libserialize`
- `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
- @pcwalton's change in 449a7a8 didn't sneak back in
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/deriving/decodable.rs7
-rw-r--r--src/libsyntax/ext/deriving/encodable.rs6
-rw-r--r--src/libsyntax/ext/deriving/generic.rs2
3 files changed, 7 insertions, 8 deletions
diff --git a/src/libsyntax/ext/deriving/decodable.rs b/src/libsyntax/ext/deriving/decodable.rs
index 019a4dfe7cc..ad7b3a2e950 100644
--- a/src/libsyntax/ext/deriving/decodable.rs
+++ b/src/libsyntax/ext/deriving/decodable.rs
@@ -28,12 +28,12 @@ pub fn expand_deriving_decodable(cx: &ExtCtxt,
     let trait_def = TraitDef {
         cx: cx, span: span,
 
-        path: Path::new_(~["extra", "serialize", "Decodable"], None,
+        path: Path::new_(~["serialize", "Decodable"], None,
                          ~[~Literal(Path::new_local("__D"))], true),
         additional_bounds: ~[],
         generics: LifetimeBounds {
             lifetimes: ~[],
-            bounds: ~[("__D", ~[Path::new(~["extra", "serialize", "Decoder"])])],
+            bounds: ~[("__D", ~[Path::new(~["serialize", "Decoder"])])],
         },
         methods: ~[
             MethodDef {
@@ -56,8 +56,7 @@ pub fn expand_deriving_decodable(cx: &ExtCtxt,
 fn decodable_substructure(cx: &ExtCtxt, trait_span: Span,
                           substr: &Substructure) -> @Expr {
     let decoder = substr.nonself_args[0];
-    let recurse = ~[cx.ident_of("extra"),
-                    cx.ident_of("serialize"),
+    let recurse = ~[cx.ident_of("serialize"),
                     cx.ident_of("Decodable"),
                     cx.ident_of("decode")];
     // throw an underscore in front to suppress unused variable warnings
diff --git a/src/libsyntax/ext/deriving/encodable.rs b/src/libsyntax/ext/deriving/encodable.rs
index c50c9f18389..66b744ecbcb 100644
--- a/src/libsyntax/ext/deriving/encodable.rs
+++ b/src/libsyntax/ext/deriving/encodable.rs
@@ -22,7 +22,7 @@ For example, a type like:
 
 would generate two implementations like:
 
-impl<S:extra::serialize::Encoder> Encodable<S> for Node {
+impl<S:serialize::Encoder> Encodable<S> for Node {
     fn encode(&self, s: &S) {
         s.emit_struct("Node", 1, || {
             s.emit_field("id", 0, || s.emit_uint(self.id))
@@ -89,12 +89,12 @@ pub fn expand_deriving_encodable(cx: &ExtCtxt,
     let trait_def = TraitDef {
         cx: cx, span: span,
 
-        path: Path::new_(~["extra", "serialize", "Encodable"], None,
+        path: Path::new_(~["serialize", "Encodable"], None,
                          ~[~Literal(Path::new_local("__E"))], true),
         additional_bounds: ~[],
         generics: LifetimeBounds {
             lifetimes: ~[],
-            bounds: ~[("__E", ~[Path::new(~["extra", "serialize", "Encoder"])])],
+            bounds: ~[("__E", ~[Path::new(~["serialize", "Encoder"])])],
         },
         methods: ~[
             MethodDef {
diff --git a/src/libsyntax/ext/deriving/generic.rs b/src/libsyntax/ext/deriving/generic.rs
index 8eaff592765..992ee3175ed 100644
--- a/src/libsyntax/ext/deriving/generic.rs
+++ b/src/libsyntax/ext/deriving/generic.rs
@@ -204,7 +204,7 @@ pub struct TraitDef<'a> {
     /// other than the current trait
     additional_bounds: ~[Ty<'a>],
 
-    /// Any extra lifetimes and/or bounds, e.g. `D: extra::serialize::Decoder`
+    /// Any extra lifetimes and/or bounds, e.g. `D: serialize::Decoder`
     generics: LifetimeBounds<'a>,
 
     methods: ~[MethodDef<'a>]