diff --git a/examples/serde-syntex-example/Cargo.toml b/examples/serde-syntex-example/Cargo.toml index 902cac119..7e87e8339 100644 --- a/examples/serde-syntex-example/Cargo.toml +++ b/examples/serde-syntex-example/Cargo.toml @@ -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 } diff --git a/serde/Cargo.toml b/serde/Cargo.toml index 31ebef39d..493940d64 100644 --- a/serde/Cargo.toml +++ b/serde/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "serde" -version = "0.7.13" +version = "0.7.14" authors = ["Erick Tryzelaar "] license = "MIT/Apache-2.0" description = "A generic serialization/deserialization framework" diff --git a/serde_codegen/Cargo.toml b/serde_codegen/Cargo.toml index 580d94977..eaebaa334 100644 --- a/serde_codegen/Cargo.toml +++ b/serde_codegen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "serde_codegen" -version = "0.7.13" +version = "0.7.14" authors = ["Erick Tryzelaar "] 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 } diff --git a/serde_codegen_internals/Cargo.toml b/serde_codegen_internals/Cargo.toml index dd1651306..a6b135230 100644 --- a/serde_codegen_internals/Cargo.toml +++ b/serde_codegen_internals/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "serde_codegen_internals" -version = "0.2.0" +version = "0.3.0" authors = ["Erick Tryzelaar "] 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 } diff --git a/serde_codegen_internals/src/attr.rs b/serde_codegen_internals/src/attr.rs index 0e8dba140..0b2ebf727 100644 --- a/serde_codegen_internals/src/attr.rs +++ b/serde_codegen_internals/src/attr.rs @@ -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(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); diff --git a/serde_macros/Cargo.toml b/serde_macros/Cargo.toml index a59b63614..cb642805a 100644 --- a/serde_macros/Cargo.toml +++ b/serde_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "serde_macros" -version = "0.7.13" +version = "0.7.14" authors = ["Erick Tryzelaar "] 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" diff --git a/serde_test/Cargo.toml b/serde_test/Cargo.toml index c5cea73ab..600215644 100644 --- a/serde_test/Cargo.toml +++ b/serde_test/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "serde_test" -version = "0.7.13" +version = "0.7.14" authors = ["Erick Tryzelaar "] 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" } diff --git a/testing/Cargo.toml b/testing/Cargo.toml index 821d574cc..4eb83a2a5 100644 --- a/testing/Cargo.toml +++ b/testing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "serde_testing" -version = "0.7.13" +version = "0.7.14" authors = ["Erick Tryzelaar "] license = "MIT/Apache-2.0" description = "A generic serialization/deserialization framework"