]> git.lizzy.rs Git - rust.git/commit
serialize: Fully deprecate the library
authorAlex Crichton <alex@alexcrichton.com>
Fri, 19 Dec 2014 06:52:48 +0000 (22:52 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 22 Dec 2014 08:14:56 +0000 (00:14 -0800)
commita76a80276852f05f30adaa4d2a8a2729b5fc0bfa
tree118a535c640013b22519f38dfa9af893dc5986a4
parent34d680009205de2302b902d8f9f5f7ae7a042f1a
serialize: Fully deprecate the library

This commit completes the deprecation story for the in-tree serialization
library. The compiler will now emit a warning whenever it encounters
`deriving(Encodable)` or `deriving(Decodable)`, and the library itself is now
marked `#[unstable]` for when feature staging is enabled.

All users of serialization can migrate to the `rustc-serialize` crate on
crates.io which provides the exact same interface as the libserialize library
in-tree. The new deriving modes are named `RustcEncodable` and `RustcDecodable`
and require `extern crate "rustc-serialize" as rustc_serialize` at the crate
root in order to expand correctly.

To migrate all crates, add the following to your `Cargo.toml`:

    [dependencies]
    rustc-serialize = "0.1.1"

And then add the following to your crate root:

    extern crate "rustc-serialize" as rustc_serialize;

Finally, rename `Encodable` and `Decodable` deriving modes to `RustcEncodable`
and `RustcDecodable`.

[breaking-change]
25 files changed:
src/librustc/lib.rs
src/librustc/middle/def.rs
src/librustc/middle/region.rs
src/librustc/middle/resolve_lifetime.rs
src/librustc/middle/subst.rs
src/librustc/middle/ty.rs
src/librustdoc/clean/mod.rs
src/librustdoc/doctree.rs
src/librustdoc/lib.rs
src/librustdoc/stability_summary.rs
src/libserialize/json.rs
src/libserialize/lib.rs
src/libsyntax/abi.rs
src/libsyntax/ast.rs
src/libsyntax/ast_util.rs
src/libsyntax/attr.rs
src/libsyntax/codemap.rs
src/libsyntax/ext/deriving/decodable.rs
src/libsyntax/ext/deriving/encodable.rs
src/libsyntax/ext/deriving/mod.rs
src/libsyntax/ext/mtwt.rs
src/libsyntax/lib.rs
src/libsyntax/parse/token.rs
src/libtest/lib.rs
src/libtime/lib.rs