Changed the deprecated `#[deriving(…)]` to `#[derive(…)]`.
(Why not 0.9.5? I messed up, publishing the `clone` branch as 0.9.5.)
[package]
name = "anymap"
[package]
name = "anymap"
authors = ["Chris Morgan <me@chrismorgan.info>"]
description = "A safe and convenient store for one value of each type"
#documentation = "http://www.rust-ci.org/chris-morgan/anymap/doc/anymap/index.html"
authors = ["Chris Morgan <me@chrismorgan.info>"]
description = "A safe and convenient store for one value of each type"
#documentation = "http://www.rust-ci.org/chris-morgan/anymap/doc/anymap/index.html"
/// data.remove::<int>();
/// assert_eq!(data.get::<int>(), None);
///
/// data.remove::<int>();
/// assert_eq!(data.get::<int>(), None);
///
-/// #[deriving(PartialEq, Show)]
+/// #[derive(PartialEq, Show)]
/// struct Foo {
/// str: String,
/// }
/// struct Foo {
/// str: String,
/// }
#[test]
fn test_entry() {
#[test]
fn test_entry() {
- #[deriving(Show, PartialEq)] struct A(int);
- #[deriving(Show, PartialEq)] struct B(int);
- #[deriving(Show, PartialEq)] struct C(int);
- #[deriving(Show, PartialEq)] struct D(int);
- #[deriving(Show, PartialEq)] struct E(int);
- #[deriving(Show, PartialEq)] struct F(int);
- #[deriving(Show, PartialEq)] struct J(int);
+ #[derive(Show, PartialEq)] struct A(int);
+ #[derive(Show, PartialEq)] struct B(int);
+ #[derive(Show, PartialEq)] struct C(int);
+ #[derive(Show, PartialEq)] struct D(int);
+ #[derive(Show, PartialEq)] struct E(int);
+ #[derive(Show, PartialEq)] struct F(int);
+ #[derive(Show, PartialEq)] struct J(int);
let mut map: AnyMap = AnyMap::new();
assert_eq!(map.insert(A(10)), None);
let mut map: AnyMap = AnyMap::new();
assert_eq!(map.insert(A(10)), None);