Compare commits

...

9 Commits

Author SHA1 Message Date
Erick Tryzelaar b6965ecde8 feat(cargo): Version bump 2016-02-22 08:15:17 -08:00
Erick Tryzelaar 3f3cffe317 Merge pull request #240 from kevinmehall/nightly
Fix cargo `nightly` feature
2016-02-21 13:28:54 -08:00
Kevin Mehall 4e7b0ac089 Fix cargo nightly feature
517c2f79b7 renamed the `nightly` feature to `nightly-testing` to
reflect that the `clippy` dependency is only required when testing.
However, the code also uses `#[cfg(feature = "nightly")]` to enable
trait impls for feature-gated types. This commit restores that
functionality and fixes a few `cfg_attr`s that refer to clippy lints.
2016-02-21 13:01:04 -08:00
Erick Tryzelaar f6a66a5537 feat(cargo): Rustup to latest nightly 2016-02-18 09:27:41 -08:00
Erick Tryzelaar fd5ab8c5c8 feat(cargo): Version bump 2016-02-13 22:06:08 -08:00
Erick Tryzelaar 39fa78e2ec Merge pull request #236 from debris/rustup3
Update serde_codegen for rustc 1.8.0-nightly (ce4b75f25 2016-02-12)
2016-02-13 21:56:07 -08:00
debris e18416ac7f updated serde_tests deps 2016-02-14 03:43:37 +01:00
debris b63cc13f3a updated clippy to 0.0.41 2016-02-14 03:33:58 +01:00
debris 74b230c183 Update serde_codegen for rustc 1.8.0-nightly (ce4b75f25 2016-02-12) 2016-02-14 03:27:20 +01:00
8 changed files with 35 additions and 34 deletions
+4 -3
View File
@@ -1,6 +1,6 @@
[package]
name = "serde"
version = "0.6.12"
version = "0.6.15"
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
license = "MIT/Apache-2.0"
description = "A generic serialization/deserialization framework"
@@ -10,12 +10,13 @@ readme = "../README.md"
keywords = ["serde", "serialization"]
[features]
nightly-testing = ["clippy"]
nightly = []
nightly-testing = ["clippy", "nightly"]
num-bigint = ["num/bigint"]
num-complex = ["num/complex"]
num-impls = ["num-bigint", "num-complex", "num-rational"]
num-rational = ["num/rational"]
[dependencies]
clippy = { version = "^0.0.39", optional = true }
clippy = { version = "^0.*", optional = true }
num = { version = "^0.1.27", default-features = false }
+2 -2
View File
@@ -12,8 +12,8 @@
#![doc(html_root_url="https://serde-rs.github.io/serde/serde")]
#![cfg_attr(feature = "nightly", feature(collections, enumset, nonzero, plugin, step_trait,
zero_one))]
#![cfg_attr(feature = "nightly", plugin(clippy))]
#![cfg_attr(feature = "nightly", allow(linkedlist))]
#![cfg_attr(feature = "nightly-testing", plugin(clippy))]
#![cfg_attr(feature = "nightly-testing", allow(linkedlist))]
#![deny(missing_docs)]
+2 -2
View File
@@ -322,7 +322,7 @@ pub trait Serializer {
}
/// A trait that is used by a `Serialize` to iterate through a sequence.
#[cfg_attr(feature = "nightly", allow(len_without_is_empty))]
#[cfg_attr(feature = "nightly-testing", allow(len_without_is_empty))]
pub trait SeqVisitor {
/// Serializes a sequence item in the serializer.
///
@@ -339,7 +339,7 @@ pub trait SeqVisitor {
}
/// A trait that is used by a `Serialize` to iterate through a map.
#[cfg_attr(feature = "nightly", allow(len_without_is_empty))]
#[cfg_attr(feature = "nightly-testing", allow(len_without_is_empty))]
pub trait MapVisitor {
/// Serializes a map item in the serializer.
///
+9 -9
View File
@@ -1,6 +1,6 @@
[package]
name = "serde_codegen"
version = "0.6.12"
version = "0.6.14"
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.5.0", optional = true }
syntex = { version = "^0.27.0", optional = true }
quasi_codegen = { version = "^0.7.0", optional = true }
syntex = { version = "^0.29.0", optional = true }
[dependencies]
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 }
aster = { version = "^0.13.1", default-features = false }
clippy = { version = "^0.*", optional = true }
quasi = { version = "^0.7.0", default-features = false }
quasi_macros = { version = "^0.7.0", optional = true }
syntex = { version = "^0.29.0", optional = true }
syntex_syntax = { version = "^0.29.0", optional = true }
+7 -7
View File
@@ -393,7 +393,7 @@ fn deserialize_seq(
struct_path: ast::Path,
fields: usize,
) -> P<ast::Expr> {
let let_values: Vec<P<ast::Stmt>> = (0 .. fields)
let let_values: Vec<ast::Stmt> = (0 .. fields)
.map(|i| {
let name = builder.id(format!("__field{}", i));
quote_stmt!(cx,
@@ -427,7 +427,7 @@ fn deserialize_struct_as_seq(
struct_path: ast::Path,
fields: &[ast::StructField],
) -> Result<P<ast::Expr>, ()> {
let let_values: Vec<P<ast::Stmt>> = (0 .. fields.len())
let let_values: Vec<ast::Stmt> = (0 .. fields.len())
.map(|i| {
let name = builder.id(format!("__field{}", i));
quote_stmt!(cx,
@@ -574,8 +574,8 @@ fn deserialize_item_enum(
// Match arms to extract a variant from a string
let mut variant_arms = vec![];
for (i, variant) in enum_def.variants.iter().enumerate() {
let variant_name = builder.pat().enum_()
.id("__Field").id(format!("__field{}", i)).build()
let variant_name = builder.pat().path()
.id("__Field").id(format!("__field{}", i))
.build();
let expr = try!(deserialize_variant(
@@ -930,7 +930,7 @@ fn deserialize_struct_visitor(
builder: &aster::AstBuilder,
struct_path: ast::Path,
fields: &[ast::StructField],
) -> Result<(Vec<P<ast::Item>>, P<ast::Stmt>, P<ast::Expr>), ()> {
) -> Result<(Vec<P<ast::Item>>, ast::Stmt, P<ast::Expr>), ()> {
let field_visitor = deserialize_field_visitor(
cx,
builder,
@@ -977,7 +977,7 @@ fn deserialize_map(
.collect();
// Declare each field.
let let_values: Vec<P<ast::Stmt>> = field_names.iter()
let let_values: Vec<ast::Stmt> = field_names.iter()
.map(|field_name| quote_stmt!(cx, let mut $field_name = None;).unwrap())
.collect();
@@ -994,7 +994,7 @@ fn deserialize_map(
let field_attrs = try!(field::struct_field_attrs(cx, builder, fields));
let extract_values: Vec<P<ast::Stmt>> = field_names.iter()
let extract_values: Vec<ast::Stmt> = field_names.iter()
.zip(field_attrs.iter())
.map(|(field_name, field_attr)| {
let missing_expr = if field_attr.use_default() {
+2 -2
View File
@@ -313,8 +313,8 @@ fn serialize_variant(
match variant.node.data {
ast::VariantData::Unit(_) => {
let pat = builder.pat().enum_()
.id(type_ident).id(variant_ident).build()
let pat = builder.pat().path()
.id(type_ident).id(variant_ident)
.build();
Ok(quote_arm!(cx,
+4 -4
View File
@@ -1,6 +1,6 @@
[package]
name = "serde_macros"
version = "0.6.12"
version = "0.6.14"
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.39", optional = true }
serde_codegen = { version = "^0.6.12", path = "../serde_codegen", default-features = false, features = ["nightly"] }
clippy = { version = "^0.*", optional = true }
serde_codegen = { version = "^0.6.14", 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.12", path = "../serde", features = ["num-impls"] }
serde = { version = "^0.6.14", path = "../serde", features = ["num-impls"] }
[[test]]
name = "test"
+5 -5
View File
@@ -14,18 +14,18 @@ build = "build.rs"
nightly-testing = ["clippy", "serde/nightly-testing", "serde_codegen/nightly-testing"]
[build-dependencies]
syntex = { version = "^0.27.0" }
syntex_syntax = { version = "^0.27.0" }
serde_codegen = { version = "^0.6.12", path = "../serde_codegen", features = ["with-syntex"] }
syntex = { version = "^0.29.0" }
syntex_syntax = { version = "^0.29.0" }
serde_codegen = { version = "^0.6.14", path = "../serde_codegen", features = ["with-syntex"] }
[dev-dependencies]
num = "^0.1.26"
rustc-serialize = "^0.3.16"
serde = { version = "*", path = "../serde", features = ["num-impls"] }
syntex = "^0.27.0"
syntex = "^0.29.0"
[dependencies]
clippy = { version = "^0.0.39", optional = true }
clippy = { version = "^0.*", optional = true }
[[test]]
name = "test"