Skip to content

Commit 6089dcf

Browse files
committed
Update syn, quote, proc-macro2 and bump versions
1 parent ad39746 commit 6089dcf

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cssparser"
3-
version = "0.23.9"
3+
version = "0.23.10"
44
authors = [ "Simon Sapin <simon.sapin@exyr.org>" ]
55

66
description = "Rust implementation of CSS Syntax Level 3"
@@ -30,9 +30,9 @@ serde = {version = "1.0", optional = true}
3030
smallvec = "0.6"
3131

3232
[build-dependencies]
33-
syn = { version = "0.13", features = ["extra-traits", "fold"] }
34-
quote = "0.5"
35-
proc-macro2 = "0.3"
33+
syn = { version = "0.14", features = ["extra-traits", "fold"] }
34+
quote = "0.6"
35+
proc-macro2 = "0.4"
3636

3737
[features]
3838
bench = []

build/match_byte.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::path::Path;
99
use syn;
1010
use syn::fold::Fold;
1111

12-
use proc_macro2::TokenStream;
12+
use proc_macro2::{Span, TokenStream};
1313

1414
struct MatchByteParser {
1515
}
@@ -21,7 +21,7 @@ pub fn expand(from: &Path, to: &Path) {
2121
let mut m = MatchByteParser {};
2222
let ast = m.fold_file(ast);
2323

24-
let code = ast.into_tokens().to_string().replace("{ ", "{\n").replace(" }", "\n}");
24+
let code = ast.into_token_stream().to_string().replace("{ ", "{\n").replace(" }", "\n}");
2525
File::create(to).unwrap().write_all(code.as_bytes()).unwrap();
2626
}
2727

@@ -82,7 +82,7 @@ fn expand_match_byte(body: &TokenStream) -> syn::Expr {
8282
for (i, ref arm) in match_byte.arms.iter().enumerate() {
8383
let case_id = i + 1;
8484
let index = case_id as isize;
85-
let name = syn::Ident::from(format!("Case{}", case_id));
85+
let name = syn::Ident::new(&format!("Case{}", case_id), Span::call_site());
8686

8787
for pat in &arm.pats {
8888
match pat {
@@ -111,7 +111,7 @@ fn expand_match_byte(body: &TokenStream) -> syn::Expr {
111111
}
112112
}
113113
},
114-
&syn::Pat::Ident(syn::PatIdent { ident, .. }) => {
114+
&syn::Pat::Ident(syn::PatIdent { ref ident, .. }) => {
115115
assert_eq!(wildcard, None);
116116
wildcard = Some(ident);
117117
for byte in table.iter_mut() {

macros/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cssparser-macros"
3-
version = "0.3.3"
3+
version = "0.3.4"
44
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
55
description = "Procedural macros for cssparser"
66
documentation = "https://docs.rs/cssparser-macros/"
@@ -14,6 +14,6 @@ proc-macro = true
1414
[dependencies]
1515
procedural-masquerade = {path = "../procedural-masquerade", version = "0.1"}
1616
phf_codegen = "0.7"
17-
quote = "0.5"
18-
syn = {version = "0.13", features = ["full", "extra-traits"]}
19-
proc-macro2 = "0.3"
17+
quote = "0.6"
18+
syn = {version = "0.14", features = ["full", "extra-traits"]}
19+
proc-macro2 = "0.4"

macros/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ extern crate proc_macro2;
1010
extern crate syn;
1111

1212
#[allow(unused_imports)] use std::ascii::AsciiExt;
13+
use quote::TokenStreamExt;
1314
use std::iter;
1415
use proc_macro2::{TokenStream, TokenTree};
1516

0 commit comments

Comments
 (0)