From 5b925d49e8df7f1feb25fc608778dbc4c0355b68 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 8 Jul 2016 21:34:59 -0700 Subject: [PATCH] Update syntex to 0.38 --- quasi/Cargo.toml | 6 +++--- quasi/src/lib.rs | 9 +++++---- quasi_codegen/Cargo.toml | 10 +++++----- quasi_codegen/src/lib.rs | 5 ++++- quasi_macros/Cargo.toml | 8 ++++---- quasi_tests/Cargo.toml | 10 +++++----- 6 files changed, 26 insertions(+), 22 deletions(-) diff --git a/quasi/Cargo.toml b/quasi/Cargo.toml index fd13cdf8..24a4b157 100644 --- a/quasi/Cargo.toml +++ b/quasi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quasi" -version = "0.14.0" +version = "0.15.0" authors = ["Erick Tryzelaar "] license = "MIT/Apache-2.0" description = "A quasi-quoting macro system" @@ -13,5 +13,5 @@ unstable-testing = ["clippy"] [dependencies] clippy = { version = "^0.*", optional = true } -syntex_errors = { version = "^0.37.0", optional = true } -syntex_syntax = { version = "^0.37.0", optional = true } +syntex_errors = { version = "^0.38.0", optional = true } +syntex_syntax = { version = "^0.38.0", optional = true } diff --git a/quasi/src/lib.rs b/quasi/src/lib.rs index 6aea928f..0276f859 100644 --- a/quasi/src/lib.rs +++ b/quasi/src/lib.rs @@ -26,6 +26,7 @@ extern crate rustc_errors as errors; use std::iter; use std::marker; +use std::rc::Rc; use std::usize; use syntax::ast; @@ -226,12 +227,12 @@ impl ToTokens for ast::Attribute { if self.node.style == ast::AttrStyle::Inner { r.push(TokenTree::Token(self.span, token::Not)); } - r.push(TokenTree::Delimited(self.span, tokenstream::Delimited { + r.push(TokenTree::Delimited(self.span, Rc::new(tokenstream::Delimited { delim: token::Bracket, open_span: self.span, tts: self.node.value.to_tokens(cx), close_span: self.span, - })); + }))); r } } @@ -247,12 +248,12 @@ impl ToTokens for str { impl ToTokens for () { fn to_tokens(&self, _cx: &ExtCtxt) -> Vec { - vec![TokenTree::Delimited(DUMMY_SP, tokenstream::Delimited { + vec![TokenTree::Delimited(DUMMY_SP, Rc::new(tokenstream::Delimited { delim: token::Paren, open_span: DUMMY_SP, tts: vec![], close_span: DUMMY_SP, - })] + }))] } } diff --git a/quasi_codegen/Cargo.toml b/quasi_codegen/Cargo.toml index b725f187..adb25c5c 100644 --- a/quasi_codegen/Cargo.toml +++ b/quasi_codegen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quasi_codegen" -version = "0.14.0" +version = "0.15.0" authors = ["Erick Tryzelaar "] license = "MIT/Apache-2.0" description = "A quasi-quoting macro system" @@ -13,8 +13,8 @@ with-syntex = ["syntex", "syntex_errors", "syntex_syntax", "aster/with-syntex"] unstable-testing = ["clippy"] [dependencies] -aster = { version = "^0.20.0", default-features = false } +aster = { version = "^0.21.0", default-features = false } clippy = { version = "^0.*", optional = true } -syntex = { version = "^0.37.0", optional = true } -syntex_errors = { version = "^0.37.0", optional = true } -syntex_syntax = { version = "^0.37.0", optional = true } +syntex = { version = "^0.38.0", optional = true } +syntex_errors = { version = "^0.38.0", optional = true } +syntex_syntax = { version = "^0.38.0", optional = true } diff --git a/quasi_codegen/src/lib.rs b/quasi_codegen/src/lib.rs index 59dc77b2..97995568 100644 --- a/quasi_codegen/src/lib.rs +++ b/quasi_codegen/src/lib.rs @@ -556,10 +556,13 @@ fn statements_mk_tt(tt: &TokenTree, matcher: bool) -> Result { .field("num_captures").usize(seq.num_captures) .build(); + let e_rc_new = builder.expr().rc() + .build(e_seq_struct); + let e_tok = builder.expr().call() .build(mk_tt_path(&builder, "Sequence")) .arg().build(e_sp) - .arg().build(e_seq_struct) + .arg().build(e_rc_new) .build(); let e_push = builder.expr().method_call("push").id("tt") diff --git a/quasi_macros/Cargo.toml b/quasi_macros/Cargo.toml index 7c83d7dc..24d58633 100644 --- a/quasi_macros/Cargo.toml +++ b/quasi_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quasi_macros" -version = "0.14.0" +version = "0.15.0" authors = ["Erick Tryzelaar "] license = "MIT/Apache-2.0" description = "A quasi-quoting macro system" @@ -16,8 +16,8 @@ unstable-testing = ["clippy", "quasi/unstable-testing", "quasi_codegen/unstable- [dependencies] clippy = { version = "^0.*", optional = true } -quasi_codegen = { version = "^0.14.0", path = "../quasi_codegen", default-features = false } +quasi_codegen = { version = "^0.15.0", path = "../quasi_codegen", default-features = false } [dev-dependencies] -aster = "^0.20.0" -quasi = { version = "^0.14.0", path = "../quasi" } +aster = "^0.21.0" +quasi = { version = "^0.15.0", path = "../quasi" } diff --git a/quasi_tests/Cargo.toml b/quasi_tests/Cargo.toml index 6b192f2d..26889ec4 100644 --- a/quasi_tests/Cargo.toml +++ b/quasi_tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quasi_tests" -version = "0.14.0" +version = "0.15.0" authors = ["Erick Tryzelaar "] license = "MIT/Apache-2.0" description = "A quasi-quoting macro system" @@ -12,13 +12,13 @@ unstable-testing = ["clippy", "quasi/unstable-testing", "quasi_codegen/unstable- [build-dependencies] quasi_codegen = { path = "../quasi_codegen" } -syntex = { version = "^0.37.0" } +syntex = { version = "^0.38.0" } [dependencies] clippy = { version = "^0.*", optional = true } [dev-dependencies] -aster = { version = "^0.20.0", features = ["with-syntex"] } +aster = { version = "^0.21.0", features = ["with-syntex"] } quasi = { path = "../quasi", features = ["with-syntex"] } -syntex = { version = "^0.37.0" } -syntex_syntax = { version = "^0.37.0" } +syntex = { version = "^0.38.0" } +syntex_syntax = { version = "^0.38.0" }