feat(cargo): Version bump
This commit is contained in:
parent
3a5aa00262
commit
32163cd53b
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "serde"
|
||||
version = "0.6.11"
|
||||
version = "0.6.12"
|
||||
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
|
||||
license = "MIT/Apache-2.0"
|
||||
description = "A generic serialization/deserialization framework"
|
||||
@ -17,5 +17,5 @@ num-impls = ["num-bigint", "num-complex", "num-rational"]
|
||||
num-rational = ["num/rational"]
|
||||
|
||||
[dependencies]
|
||||
clippy = { version = "^0.0.37", optional = true }
|
||||
clippy = { version = "^0.0.39", optional = true }
|
||||
num = { version = "^0.1.27", default-features = false }
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "serde_codegen"
|
||||
version = "0.6.11"
|
||||
version = "0.6.12"
|
||||
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
|
||||
license = "MIT/Apache-2.0"
|
||||
description = "Macros to auto-generate implementations for the serde framework"
|
||||
@ -16,13 +16,13 @@ nightly-testing = ["clippy"]
|
||||
with-syntex = ["quasi/with-syntex", "quasi_codegen", "quasi_codegen/with-syntex", "syntex", "syntex_syntax"]
|
||||
|
||||
[build-dependencies]
|
||||
quasi_codegen = { version = "^0.4.0", optional = true }
|
||||
syntex = { version = "^0.26.0", optional = true }
|
||||
quasi_codegen = { version = "^0.5.0", optional = true }
|
||||
syntex = { version = "^0.27.0", optional = true }
|
||||
|
||||
[dependencies]
|
||||
aster = { version = "^0.10.0", default-features = false }
|
||||
clippy = { version = "^0.0.37", optional = true }
|
||||
quasi = { version = "^0.4.0", default-features = false }
|
||||
quasi_macros = { version = "^0.4.0", optional = true }
|
||||
syntex = { version = "^0.26.0", optional = true }
|
||||
syntex_syntax = { version = "^0.26.0", optional = true }
|
||||
aster = { version = "^0.11.0", default-features = false }
|
||||
clippy = { version = "^0.0.39", optional = true }
|
||||
quasi = { version = "^0.5.0", default-features = false }
|
||||
quasi_macros = { version = "^0.5.0", optional = true }
|
||||
syntex = { version = "^0.27.0", optional = true }
|
||||
syntex_syntax = { version = "^0.27.0", optional = true }
|
||||
|
@ -151,7 +151,7 @@ impl<'a> FieldAttrsBuilder<'a> {
|
||||
|
||||
pub fn attr(mut self, attr: &ast::Attribute) -> Result<FieldAttrsBuilder<'a>, ()> {
|
||||
match attr.node.value.node {
|
||||
ast::MetaList(ref name, ref items) if name == &"serde" => {
|
||||
ast::MetaItemKind::List(ref name, ref items) if name == &"serde" => {
|
||||
attr::mark_used(&attr);
|
||||
for item in items {
|
||||
self = try!(self.meta_item(item));
|
||||
@ -167,15 +167,15 @@ impl<'a> FieldAttrsBuilder<'a> {
|
||||
|
||||
pub fn meta_item(mut self, meta_item: &P<ast::MetaItem>) -> Result<FieldAttrsBuilder<'a>, ()> {
|
||||
match meta_item.node {
|
||||
ast::MetaNameValue(ref name, ref lit) if name == &"rename" => {
|
||||
ast::MetaItemKind::NameValue(ref name, ref lit) if name == &"rename" => {
|
||||
let expr = self.builder.expr().build_lit(P(lit.clone()));
|
||||
|
||||
Ok(self.name(expr))
|
||||
}
|
||||
ast::MetaList(ref name, ref items) if name == &"rename" => {
|
||||
ast::MetaItemKind::List(ref name, ref items) if name == &"rename" => {
|
||||
for item in items {
|
||||
match item.node {
|
||||
ast::MetaNameValue(ref name, ref lit) => {
|
||||
ast::MetaItemKind::NameValue(ref name, ref lit) => {
|
||||
let name = self.builder.expr().str(name);
|
||||
let expr = self.builder.expr().build_lit(P(lit.clone()));
|
||||
|
||||
@ -187,16 +187,16 @@ impl<'a> FieldAttrsBuilder<'a> {
|
||||
|
||||
Ok(self)
|
||||
}
|
||||
ast::MetaWord(ref name) if name == &"default" => {
|
||||
ast::MetaItemKind::Word(ref name) if name == &"default" => {
|
||||
Ok(self.default())
|
||||
}
|
||||
ast::MetaWord(ref name) if name == &"skip_serializing" => {
|
||||
ast::MetaItemKind::Word(ref name) if name == &"skip_serializing" => {
|
||||
Ok(self.skip_serializing_field())
|
||||
}
|
||||
ast::MetaWord(ref name) if name == &"skip_serializing_if_empty" => {
|
||||
ast::MetaItemKind::Word(ref name) if name == &"skip_serializing_if_empty" => {
|
||||
Ok(self.skip_serializing_field_if_empty())
|
||||
}
|
||||
ast::MetaWord(ref name) if name == &"skip_serializing_if_none" => {
|
||||
ast::MetaItemKind::Word(ref name) if name == &"skip_serializing_if_none" => {
|
||||
Ok(self.skip_serializing_field_if_none())
|
||||
}
|
||||
_ => {
|
||||
@ -285,7 +285,7 @@ impl<'a> ContainerAttrsBuilder<'a> {
|
||||
|
||||
pub fn attr(mut self, attr: &ast::Attribute) -> Result<Self, ()> {
|
||||
match attr.node.value.node {
|
||||
ast::MetaList(ref name, ref items) if name == &"serde" => {
|
||||
ast::MetaItemKind::List(ref name, ref items) if name == &"serde" => {
|
||||
attr::mark_used(&attr);
|
||||
for item in items {
|
||||
self = try!(self.meta_item(item));
|
||||
|
@ -37,8 +37,8 @@ pub fn expand_derive_deserialize(
|
||||
let builder = aster::AstBuilder::new().span(span);
|
||||
|
||||
let generics = match item.node {
|
||||
ast::ItemStruct(_, ref generics) => generics,
|
||||
ast::ItemEnum(_, ref generics) => generics,
|
||||
ast::ItemKind::Struct(_, ref generics) => generics,
|
||||
ast::ItemKind::Enum(_, ref generics) => generics,
|
||||
_ => {
|
||||
cx.span_err(
|
||||
meta_item.span,
|
||||
@ -92,7 +92,7 @@ fn deserialize_body(
|
||||
let _ = try!(field::container_attrs(cx, item));
|
||||
|
||||
match item.node {
|
||||
ast::ItemStruct(ref variant_data, _) => {
|
||||
ast::ItemKind::Struct(ref variant_data, _) => {
|
||||
deserialize_item_struct(
|
||||
cx,
|
||||
builder,
|
||||
@ -103,7 +103,7 @@ fn deserialize_body(
|
||||
variant_data,
|
||||
)
|
||||
}
|
||||
ast::ItemEnum(ref enum_def, _) => {
|
||||
ast::ItemKind::Enum(ref enum_def, _) => {
|
||||
deserialize_item_enum(
|
||||
cx,
|
||||
builder,
|
||||
@ -558,7 +558,7 @@ fn deserialize_item_enum(
|
||||
.collect()
|
||||
);
|
||||
|
||||
let variants_expr = builder.expr().addr_of().slice()
|
||||
let variants_expr = builder.expr().ref_().slice()
|
||||
.with_exprs(
|
||||
enum_def.variants.iter()
|
||||
.map(|variant| {
|
||||
@ -944,7 +944,7 @@ fn deserialize_struct_visitor(
|
||||
fields,
|
||||
));
|
||||
|
||||
let fields_expr = builder.expr().addr_of().slice()
|
||||
let fields_expr = builder.expr().ref_().slice()
|
||||
.with_exprs(
|
||||
fields.iter()
|
||||
.map(|field| {
|
||||
|
@ -1,5 +1,6 @@
|
||||
#![cfg_attr(feature = "nightly-testing", plugin(clippy))]
|
||||
#![cfg_attr(feature = "nightly", allow(used_underscore_binding))]
|
||||
#![cfg_attr(feature = "nightly-testing", feature(plugin))]
|
||||
#![cfg_attr(feature = "nightly-testing", allow(used_underscore_binding))]
|
||||
#![cfg_attr(not(feature = "with-syntex"), feature(rustc_private, plugin))]
|
||||
#![cfg_attr(not(feature = "with-syntex"), plugin(quasi_macros))]
|
||||
|
||||
@ -31,14 +32,6 @@ include!("lib.rs.in");
|
||||
pub fn register(reg: &mut syntex::Registry) {
|
||||
use syntax::{ast, fold};
|
||||
|
||||
reg.add_attr("feature(custom_derive)");
|
||||
reg.add_attr("feature(custom_attribute)");
|
||||
|
||||
reg.add_decorator("derive_Serialize", ser::expand_derive_serialize);
|
||||
reg.add_decorator("derive_Deserialize", de::expand_derive_deserialize);
|
||||
|
||||
reg.add_post_expansion_pass(strip_attributes);
|
||||
|
||||
/// Strip the serde attributes from the crate.
|
||||
#[cfg(feature = "with-syntex")]
|
||||
fn strip_attributes(krate: ast::Crate) -> ast::Crate {
|
||||
@ -48,7 +41,7 @@ pub fn register(reg: &mut syntex::Registry) {
|
||||
impl fold::Folder for StripAttributeFolder {
|
||||
fn fold_attribute(&mut self, attr: ast::Attribute) -> Option<ast::Attribute> {
|
||||
match attr.node.value.node {
|
||||
ast::MetaList(ref n, _) if n == &"serde" => { return None; }
|
||||
ast::MetaItemKind::List(ref n, _) if n == &"serde" => { return None; }
|
||||
_ => {}
|
||||
}
|
||||
|
||||
@ -62,6 +55,14 @@ pub fn register(reg: &mut syntex::Registry) {
|
||||
|
||||
fold::Folder::fold_crate(&mut StripAttributeFolder, krate)
|
||||
}
|
||||
|
||||
reg.add_attr("feature(custom_derive)");
|
||||
reg.add_attr("feature(custom_attribute)");
|
||||
|
||||
reg.add_decorator("derive_Serialize", ser::expand_derive_serialize);
|
||||
reg.add_decorator("derive_Deserialize", de::expand_derive_deserialize);
|
||||
|
||||
reg.add_post_expansion_pass(strip_attributes);
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "with-syntex"))]
|
||||
|
@ -33,8 +33,8 @@ pub fn expand_derive_serialize(
|
||||
let builder = aster::AstBuilder::new().span(span);
|
||||
|
||||
let generics = match item.node {
|
||||
ast::ItemStruct(_, ref generics) => generics,
|
||||
ast::ItemEnum(_, ref generics) => generics,
|
||||
ast::ItemKind::Struct(_, ref generics) => generics,
|
||||
ast::ItemKind::Enum(_, ref generics) => generics,
|
||||
_ => {
|
||||
cx.span_err(
|
||||
meta_item.span,
|
||||
@ -88,7 +88,7 @@ fn serialize_body(
|
||||
let _ = try!(field::container_attrs(cx, item));
|
||||
|
||||
match item.node {
|
||||
ast::ItemStruct(ref variant_data, _) => {
|
||||
ast::ItemKind::Struct(ref variant_data, _) => {
|
||||
serialize_item_struct(
|
||||
cx,
|
||||
builder,
|
||||
@ -99,7 +99,7 @@ fn serialize_body(
|
||||
variant_data,
|
||||
)
|
||||
}
|
||||
ast::ItemEnum(ref enum_def, _) => {
|
||||
ast::ItemKind::Enum(ref enum_def, _) => {
|
||||
serialize_item_enum(
|
||||
cx,
|
||||
builder,
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "serde_macros"
|
||||
version = "0.6.11"
|
||||
version = "0.6.12"
|
||||
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
|
||||
license = "MIT/Apache-2.0"
|
||||
description = "Macros to auto-generate implementations for the serde framework"
|
||||
@ -16,14 +16,14 @@ plugin = true
|
||||
nightly-testing = ["clippy", "serde/nightly-testing", "serde_codegen/nightly-testing"]
|
||||
|
||||
[dependencies]
|
||||
clippy = { version = "^0.0.37", optional = true }
|
||||
serde_codegen = { version = "^0.6.10", path = "../serde_codegen", default-features = false, features = ["nightly"] }
|
||||
clippy = { version = "^0.0.39", optional = true }
|
||||
serde_codegen = { version = "^0.6.12", path = "../serde_codegen", default-features = false, features = ["nightly"] }
|
||||
|
||||
[dev-dependencies]
|
||||
compiletest_rs = "^0.0.11"
|
||||
num = "^0.1.27"
|
||||
rustc-serialize = "^0.3.16"
|
||||
serde = { version = "^0.6.10", path = "../serde", features = ["num-impls"] }
|
||||
serde = { version = "^0.6.12", path = "../serde", features = ["num-impls"] }
|
||||
|
||||
[[test]]
|
||||
name = "test"
|
||||
|
@ -14,18 +14,18 @@ build = "build.rs"
|
||||
nightly-testing = ["clippy", "serde/nightly-testing", "serde_codegen/nightly-testing"]
|
||||
|
||||
[build-dependencies]
|
||||
syntex = { version = "^0.26.0" }
|
||||
syntex_syntax = { version = "^0.26.0" }
|
||||
serde_codegen = { version = "*", path = "../serde_codegen", features = ["with-syntex"] }
|
||||
syntex = { version = "^0.27.0" }
|
||||
syntex_syntax = { version = "^0.27.0" }
|
||||
serde_codegen = { version = "^0.6.12", path = "../serde_codegen", features = ["with-syntex"] }
|
||||
|
||||
[dev-dependencies]
|
||||
num = "^0.1.27"
|
||||
num = "^0.1.26"
|
||||
rustc-serialize = "^0.3.16"
|
||||
serde = { version = "*", path = "../serde", features = ["num-impls"] }
|
||||
syntex = "^0.26.0"
|
||||
syntex = "^0.27.0"
|
||||
|
||||
[dependencies]
|
||||
clippy = { version = "^0.0.37", optional = true }
|
||||
clippy = { version = "^0.0.39", optional = true }
|
||||
|
||||
[[test]]
|
||||
name = "test"
|
||||
|
Loading…
x
Reference in New Issue
Block a user