Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #51 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 bf00af8 + 5b925d4 commit 77f6f2d
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 22 deletions.
6 changes: 3 additions & 3 deletions quasi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quasi"
version = "0.14.0"
version = "0.15.0"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "A quasi-quoting macro system"
Expand All @@ -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 }
9 changes: 5 additions & 4 deletions quasi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
}
}
Expand All @@ -247,12 +248,12 @@ impl ToTokens for str {

impl ToTokens for () {
fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree> {
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,
})]
}))]
}
}

Expand Down
10 changes: 5 additions & 5 deletions quasi_codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quasi_codegen"
version = "0.14.0"
version = "0.15.0"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "A quasi-quoting macro system"
Expand All @@ -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 }
5 changes: 4 additions & 1 deletion quasi_codegen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,10 +556,13 @@ fn statements_mk_tt(tt: &TokenTree, matcher: bool) -> Result<QuoteStmts, ()> {
.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")
Expand Down
8 changes: 4 additions & 4 deletions quasi_macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quasi_macros"
version = "0.14.0"
version = "0.15.0"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "A quasi-quoting macro system"
Expand All @@ -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" }
10 changes: 5 additions & 5 deletions quasi_tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quasi_tests"
version = "0.14.0"
version = "0.15.0"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "A quasi-quoting macro system"
Expand All @@ -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" }

0 comments on commit 77f6f2d

Please sign in to comment.