From a76a80276852f05f30adaa4d2a8a2729b5fc0bfa Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 18 Dec 2014 22:52:48 -0800 Subject: 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] --- src/libtest/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libtest') diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 5b04a1fed89..7ef6ec4fdcf 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -37,6 +37,7 @@ extern crate getopts; extern crate regex; extern crate serialize; +extern crate "serialize" as rustc_serialize; extern crate term; pub use self::TestFn::*; @@ -213,7 +214,7 @@ pub struct TestDescAndFn { pub testfn: TestFn, } -#[deriving(Clone, Copy, Encodable, Decodable, PartialEq, Show)] +#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq, Show, Copy)] pub struct Metric { value: f64, noise: f64 -- cgit 1.4.1-3-g733a5