Skip to content

Commit

Permalink
Merge pull request #430 from serde-rs/bump
Browse files Browse the repository at this point in the history
Update syntex to 0.38
  • Loading branch information
dtolnay authored Jul 9, 2016
2 parents 57aeb26 + a070de2 commit ddbd139
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 36 deletions.
8 changes: 4 additions & 4 deletions examples/serde-syntex-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ default = ["serde_codegen"]
nightly = ["serde_macros"]

[build-dependencies]
serde_codegen = { version = "^0.7.13", optional = true }
serde_codegen = { version = "^0.7", optional = true }

[dependencies]
serde = "^0.7.13"
serde_json = "^0.7.0"
serde_macros = { version = "^0.7.13", optional = true }
serde = "^0.7"
serde_json = "^0.7"
serde_macros = { version = "^0.7", optional = true }
2 changes: 1 addition & 1 deletion serde/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "serde"
version = "0.7.13"
version = "0.7.14"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "A generic serialization/deserialization framework"
Expand Down
18 changes: 9 additions & 9 deletions serde_codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "serde_codegen"
version = "0.7.13"
version = "0.7.14"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "Macros to auto-generate implementations for the serde framework"
Expand All @@ -24,14 +24,14 @@ with-syntex = [
]

[build-dependencies]
quasi_codegen = { version = "^0.14.0", optional = true }
syntex = { version = "^0.37.0", optional = true }
quasi_codegen = { version = "^0.15.0", optional = true }
syntex = { version = "^0.38.0", optional = true }

[dependencies]
aster = { version = "^0.20.0", default-features = false }
aster = { version = "^0.21.1", default-features = false }
clippy = { version = "^0.*", optional = true }
quasi = { version = "^0.14.0", default-features = false }
quasi_macros = { version = "^0.14.0", optional = true }
serde_codegen_internals = { version = "^0.2.0", path = "../serde_codegen_internals", default-features = false }
syntex = { version = "^0.37.0", optional = true }
syntex_syntax = { version = "^0.37.0", optional = true }
quasi = { version = "^0.15.0", default-features = false }
quasi_macros = { version = "^0.15.0", optional = true }
serde_codegen_internals = { version = "^0.3.0", path = "../serde_codegen_internals", default-features = false }
syntex = { version = "^0.38.0", optional = true }
syntex_syntax = { version = "^0.38.0", optional = true }
6 changes: 3 additions & 3 deletions serde_codegen_internals/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "serde_codegen_internals"
version = "0.2.0"
version = "0.3.0"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "AST representation used by Serde codegen. Unstable."
Expand All @@ -16,5 +16,5 @@ with-syntex = ["syntex_syntax", "syntex_errors"]

[dependencies]
clippy = { version = "^0.*", optional = true }
syntex_syntax = { version = "^0.37.0", optional = true }
syntex_errors = { version = "^0.37.0", optional = true }
syntex_syntax = { version = "^0.38.0", optional = true }
syntex_errors = { version = "^0.38.0", optional = true }
26 changes: 14 additions & 12 deletions serde_codegen_internals/src/attr.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::rc::Rc;

use syntax::ast;
use syntax::attr::{self, HasAttrs};
use syntax::codemap::{Span, Spanned, respan};
Expand Down Expand Up @@ -517,33 +519,33 @@ struct Respanner<'a, 'b: 'a> {
}

impl<'a, 'b> Folder for Respanner<'a, 'b> {
fn fold_tt(&mut self, tt: TokenTree) -> TokenTree {
match tt {
fn fold_tt(&mut self, tt: &TokenTree) -> TokenTree {
match *tt {
TokenTree::Token(span, ref tok) => {
TokenTree::Token(
self.new_span(span),
self.fold_token(tok.clone())
)
}
TokenTree::Delimited(span, delimed) => {
TokenTree::Delimited(span, ref delimed) => {
TokenTree::Delimited(
self.new_span(span),
tokenstream::Delimited {
Rc::new(tokenstream::Delimited {
delim: delimed.delim,
open_span: delimed.open_span,
tts: self.fold_tts(delimed.tts),
tts: self.fold_tts(&delimed.tts),
close_span: delimed.close_span,
}
})
)
}
TokenTree::Sequence(span, seq) => {
TokenTree::Sequence(span, ref seq) => {
TokenTree::Sequence(
self.new_span(span),
tokenstream::SequenceRepetition {
tts: self.fold_tts(seq.tts),
Rc::new(tokenstream::SequenceRepetition {
tts: self.fold_tts(&seq.tts),
separator: seq.separator.clone().map(|tok| self.fold_token(tok)),
..seq
}
..**seq
})
)
}
}
Expand Down Expand Up @@ -589,7 +591,7 @@ fn parse_string_via_tts<T, F>(cx: &ExtCtxt, name: &str, string: String, action:
cx.parse_sess()));

// Respan the spans to say they are all coming from this macro.
let tts = Respanner { cx: cx }.fold_tts(tts);
let tts = Respanner { cx: cx }.fold_tts(&tts);

let mut parser = parse::new_parser_from_tts(cx.parse_sess(), cx.cfg(), tts);

Expand Down
8 changes: 4 additions & 4 deletions serde_macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "serde_macros"
version = "0.7.13"
version = "0.7.14"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "Macros to auto-generate implementations for the serde framework"
Expand All @@ -18,15 +18,15 @@ nightly-testing = ["clippy", "serde/nightly-testing", "serde_codegen/nightly-tes

[dependencies]
clippy = { version = "^0.*", optional = true }
serde_codegen = { version = "^0.7.13", path = "../serde_codegen", default-features = false, features = ["nightly"] }
serde_codegen = { version = "^0.7.14", path = "../serde_codegen", default-features = false, features = ["nightly"] }

[dev-dependencies]
clippy = "^0.0.78"
compiletest_rs = "^0.2.0"
fnv = "1.0"
rustc-serialize = "^0.3.16"
serde = { version = "^0.7.13", path = "../serde" }
serde_test = { version = "^0.7.13", path = "../serde_test" }
serde = { version = "^0.7.14", path = "../serde" }
serde_test = { version = "^0.7.14", path = "../serde_test" }

[[test]]
name = "test"
Expand Down
4 changes: 2 additions & 2 deletions serde_test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "serde_test"
version = "0.7.13"
version = "0.7.14"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "Token De/Serializer for testing De/Serialize implementations"
Expand All @@ -11,4 +11,4 @@ keywords = ["serde", "serialization"]
include = ["Cargo.toml", "src/**/*.rs"]

[dependencies]
serde = { version = "0.7.13", path = "../serde" }
serde = { version = "0.7.14", path = "../serde" }
2 changes: 1 addition & 1 deletion testing/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "serde_testing"
version = "0.7.13"
version = "0.7.14"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "A generic serialization/deserialization framework"
Expand Down

0 comments on commit ddbd139

Please sign in to comment.