Skip to content

Commit

Permalink
Update proc-macro2, syn, and quote to 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e authored and cramertj committed Aug 14, 2019
1 parent 89fe7c4 commit 969c93f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions futures-join-macro/Cargo.toml
Expand Up @@ -18,7 +18,7 @@ proc-macro = true
[features]

[dependencies]
proc-macro2 = "0.4"
proc-macro2 = "1.0"
proc-macro-hack = "0.5.3"
quote = "0.6"
syn = { version = "0.15.25", features = ["full"] }
quote = "1.0"
syn = { version = "1.0", features = ["full"] }
4 changes: 2 additions & 2 deletions futures-join-macro/src/lib.rs
Expand Up @@ -11,7 +11,7 @@ extern crate proc_macro;
use proc_macro::TokenStream;
use proc_macro2::{Span, TokenStream as TokenStream2};
use proc_macro_hack::proc_macro_hack;
use quote::quote;
use quote::{format_ident, quote};
use syn::parse::{Parse, ParseStream};
use syn::{parenthesized, parse_quote, Expr, Ident, Token};

Expand Down Expand Up @@ -61,7 +61,7 @@ fn bind_futures(
.into_iter()
.enumerate()
.map(|(i, expr)| {
let name = Ident::new(&format!("_fut{}", i), span);
let name = format_ident!("_fut{}", i, span = span);
future_let_bindings.push(quote! {
// Move future into a local so that it is pinned in one place and
// is no longer accessible by the end user.
Expand Down
6 changes: 3 additions & 3 deletions futures-select-macro/Cargo.toml
Expand Up @@ -19,7 +19,7 @@ proc-macro = true
std = []

[dependencies]
proc-macro2 = "0.4"
proc-macro2 = "1.0"
proc-macro-hack = "0.5.3"
quote = "0.6"
syn = { version = "0.15.25", features = ["full"] }
quote = "1.0"
syn = { version = "1.0", features = ["full"] }
4 changes: 2 additions & 2 deletions futures-select-macro/src/lib.rs
Expand Up @@ -11,7 +11,7 @@ extern crate proc_macro;
use proc_macro::TokenStream;
use proc_macro2::Span;
use proc_macro_hack::proc_macro_hack;
use quote::quote;
use quote::{format_ident, quote};
use syn::{parenthesized, parse_quote, Expr, Ident, Pat, Token};
use syn::parse::{Parse, ParseStream};

Expand Down Expand Up @@ -119,7 +119,7 @@ fn declare_result_enum(
// "_0", "_1", "_2"
let variant_names: Vec<Ident> =
(0..variants)
.map(|num| Ident::new(&format!("_{}", num), span))
.map(|num| format_ident!("_{}", num, span = span))
.collect();

let type_parameters = &variant_names;
Expand Down

0 comments on commit 969c93f

Please sign in to comment.