Update syntex to 0.38

This commit is contained in:
David Tolnay 2016-07-09 09:13:46 -07:00
parent 57aeb26728
commit a070de28e2
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
8 changed files with 38 additions and 36 deletions

View File

@ -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 }

View File

@ -1,6 +1,6 @@
[package]
name = "serde"
version = "0.7.13"
version = "0.7.14"
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
license = "MIT/Apache-2.0"
description = "A generic serialization/deserialization framework"

View File

@ -1,6 +1,6 @@
[package]
name = "serde_codegen"
version = "0.7.13"
version = "0.7.14"
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
license = "MIT/Apache-2.0"
description = "Macros to auto-generate implementations for the serde framework"
@ -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 }

View File

@ -1,6 +1,6 @@
[package]
name = "serde_codegen_internals"
version = "0.2.0"
version = "0.3.0"
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
license = "MIT/Apache-2.0"
description = "AST representation used by Serde codegen. Unstable."
@ -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 }

View File

@ -1,3 +1,5 @@
use std::rc::Rc;
use syntax::ast;
use syntax::attr::{self, HasAttrs};
use syntax::codemap::{Span, Spanned, respan};
@ -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
})
)
}
}
@ -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);

View File

@ -1,6 +1,6 @@
[package]
name = "serde_macros"
version = "0.7.13"
version = "0.7.14"
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
license = "MIT/Apache-2.0"
description = "Macros to auto-generate implementations for the serde framework"
@ -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"

View File

@ -1,6 +1,6 @@
[package]
name = "serde_test"
version = "0.7.13"
version = "0.7.14"
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
license = "MIT/Apache-2.0"
description = "Token De/Serializer for testing De/Serialize implementations"
@ -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" }

View File

@ -1,6 +1,6 @@
[package]
name = "serde_testing"
version = "0.7.13"
version = "0.7.14"
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
license = "MIT/Apache-2.0"
description = "A generic serialization/deserialization framework"