syntax: deprecate #[auto_{en,de}code] in favour of #[deriving({En,De}codable)].
Replace all instances of #[auto_*code] with the appropriate #[deriving] attribute and remove the majority of the actual code, leaving stubs to refer the user to the new syntax.
This commit is contained in:
@@ -1331,26 +1331,20 @@ mod tests {
|
||||
|
||||
use std::serialize::Decodable;
|
||||
|
||||
#[auto_encode]
|
||||
#[auto_decode]
|
||||
#[deriving(Eq)]
|
||||
#[deriving(Eq, Encodable, Decodable)]
|
||||
enum Animal {
|
||||
Dog,
|
||||
Frog(~str, int)
|
||||
}
|
||||
|
||||
#[auto_encode]
|
||||
#[auto_decode]
|
||||
#[deriving(Eq)]
|
||||
#[deriving(Eq, Encodable, Decodable)]
|
||||
struct Inner {
|
||||
a: (),
|
||||
b: uint,
|
||||
c: ~[~str],
|
||||
}
|
||||
|
||||
#[auto_encode]
|
||||
#[auto_decode]
|
||||
#[deriving(Eq)]
|
||||
#[deriving(Eq, Encodable, Decodable)]
|
||||
struct Outer {
|
||||
inner: ~[Inner],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user