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

Commit

Permalink
Update to syntex 0.50
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Nov 19, 2016
1 parent fe3aee3 commit b1a805b
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions quasi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ unstable-testing = ["clippy"]

[dependencies]
clippy = { version = "^0.*", optional = true }
syntex_errors = { version = "^0.48.0", optional = true }
syntex_syntax = { version = "^0.48.0", optional = true }
syntex_errors = { version = "^0.50.0", optional = true }
syntex_syntax = { version = "^0.50.0", optional = true }
24 changes: 12 additions & 12 deletions quasi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,43 +93,43 @@ impl ToTokens for ast::Ident {

impl ToTokens for ast::Path {
fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree> {
vec![TokenTree::Token(DUMMY_SP, token::Interpolated(token::NtPath(Box::new(self.clone()))))]
vec![TokenTree::Token(DUMMY_SP, token::Interpolated(Rc::new(token::NtPath(self.clone()))))]
}
}

impl ToTokens for ast::Ty {
fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree> {
vec![TokenTree::Token(self.span, token::Interpolated(token::NtTy(P(self.clone()))))]
vec![TokenTree::Token(self.span, token::Interpolated(Rc::new(token::NtTy(P(self.clone())))))]
}
}

impl ToTokens for P<ast::Ty> {
fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree> {
vec![TokenTree::Token(self.span, token::Interpolated(token::NtTy(self.clone())))]
vec![TokenTree::Token(self.span, token::Interpolated(Rc::new(token::NtTy(self.clone()))))]
}
}

impl ToTokens for P<ast::Block> {
fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree> {
vec![TokenTree::Token(self.span, token::Interpolated(token::NtBlock(self.clone())))]
vec![TokenTree::Token(self.span, token::Interpolated(Rc::new(token::NtBlock(self.clone()))))]
}
}

impl ToTokens for P<ast::Item> {
fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree> {
vec![TokenTree::Token(self.span, token::Interpolated(token::NtItem(self.clone())))]
vec![TokenTree::Token(self.span, token::Interpolated(Rc::new(token::NtItem(self.clone()))))]
}
}

impl ToTokens for P<ast::ImplItem> {
fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree> {
vec![TokenTree::Token(self.span, token::Interpolated(token::NtImplItem(self.clone())))]
vec![TokenTree::Token(self.span, token::Interpolated(Rc::new(token::NtImplItem((**self).clone()))))]
}
}

impl ToTokens for P<ast::TraitItem> {
fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree> {
vec![TokenTree::Token(self.span, token::Interpolated(token::NtTraitItem(self.clone())))]
vec![TokenTree::Token(self.span, token::Interpolated(Rc::new(token::NtTraitItem((**self).clone()))))]
}
}

Expand Down Expand Up @@ -169,7 +169,7 @@ impl ToTokens for ast::WhereClause {
impl ToTokens for ast::Stmt {
fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree> {
let mut tts = vec![
TokenTree::Token(self.span, token::Interpolated(token::NtStmt(P(self.clone()))))
TokenTree::Token(self.span, token::Interpolated(Rc::new(token::NtStmt(self.clone()))))
];

// Some statements require a trailing semicolon.
Expand All @@ -183,19 +183,19 @@ impl ToTokens for ast::Stmt {

impl ToTokens for P<ast::Expr> {
fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree> {
vec![TokenTree::Token(self.span, token::Interpolated(token::NtExpr(self.clone())))]
vec![TokenTree::Token(self.span, token::Interpolated(Rc::new(token::NtExpr(self.clone()))))]
}
}

impl ToTokens for P<ast::Pat> {
fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree> {
vec![TokenTree::Token(self.span, token::Interpolated(token::NtPat(self.clone())))]
vec![TokenTree::Token(self.span, token::Interpolated(Rc::new(token::NtPat(self.clone()))))]
}
}

impl ToTokens for ast::Arm {
fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree> {
vec![TokenTree::Token(DUMMY_SP, token::Interpolated(token::NtArm(self.clone())))]
vec![TokenTree::Token(DUMMY_SP, token::Interpolated(Rc::new(token::NtArm(self.clone()))))]
}
}

Expand All @@ -221,7 +221,7 @@ impl_to_tokens_slice! { P<ast::Item>, [] }

impl ToTokens for P<ast::MetaItem> {
fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree> {
vec![TokenTree::Token(DUMMY_SP, token::Interpolated(token::NtMeta(self.clone())))]
vec![TokenTree::Token(DUMMY_SP, token::Interpolated(Rc::new(token::NtMeta(self.clone()))))]
}
}

Expand Down
8 changes: 4 additions & 4 deletions quasi_codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ with-syntex = ["syntex", "syntex_errors", "syntex_syntax", "aster/with-syntex"]
unstable-testing = ["clippy"]

[dependencies]
aster = { version = "^0.33.0", default-features = false }
aster = { version = "^0.34.0", default-features = false }
clippy = { version = "^0.*", optional = true }
syntex = { version = "^0.48.0", optional = true }
syntex_errors = { version = "^0.48.0", optional = true }
syntex_syntax = { version = "^0.48.0", optional = true }
syntex = { version = "^0.50.0", optional = true }
syntex_errors = { version = "^0.50.0", optional = true }
syntex_syntax = { version = "^0.50.0", optional = true }
2 changes: 1 addition & 1 deletion quasi_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ clippy = { version = "^0.*", optional = true }
quasi_codegen = { version = "^0.25", path = "../quasi_codegen", default-features = false }

[dev-dependencies]
aster = "^0.33.0"
aster = "^0.34.0"
quasi = { version = "^0.25", path = "../quasi" }
8 changes: 4 additions & 4 deletions quasi_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ unstable-testing = ["clippy", "quasi/unstable-testing", "quasi_codegen/unstable-

[build-dependencies]
quasi_codegen = { path = "../quasi_codegen" }
syntex = { version = "^0.48.0" }
syntex = { version = "^0.50.0" }

[dependencies]
clippy = { version = "^0.*", optional = true }

[dev-dependencies]
aster = { version = "^0.33.0", features = ["with-syntex"] }
aster = { version = "^0.34.0", features = ["with-syntex"] }
quasi = { path = "../quasi", features = ["with-syntex"] }
syntex = { version = "^0.48.0" }
syntex_syntax = { version = "^0.48.0" }
syntex = { version = "^0.50.0" }
syntex_syntax = { version = "^0.50.0" }

0 comments on commit b1a805b

Please sign in to comment.