Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Update syn and fix compilation (#11707)
Browse files Browse the repository at this point in the history
* Update syn and fix compilation

* Bump pin-project
  • Loading branch information
bkchr committed Jun 20, 2022
1 parent 257cdb5 commit 814752f
Show file tree
Hide file tree
Showing 16 changed files with 37 additions and 30 deletions.
30 changes: 18 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/chain-spec/derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ proc-macro = true
proc-macro-crate = "1.1.3"
proc-macro2 = "1.0.37"
quote = "1.0.10"
syn = "1.0.82"
syn = "1.0.98"
2 changes: 1 addition & 1 deletion client/tracing/proc-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ proc-macro = true
proc-macro-crate = "1.1.3"
proc-macro2 = "1.0.37"
quote = { version = "1.0.10", features = ["proc-macro"] }
syn = { version = "1.0.82", features = ["proc-macro", "full", "extra-traits", "parsing"] }
syn = { version = "1.0.98", features = ["proc-macro", "full", "extra-traits", "parsing"] }
2 changes: 1 addition & 1 deletion frame/contracts/proc-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ proc-macro = true
[dependencies]
proc-macro2 = "1"
quote = "1"
syn = "1"
syn = "1.0.98"

[dev-dependencies]

Expand Down
2 changes: 1 addition & 1 deletion frame/election-provider-support/solution-type/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"]
proc-macro = true

[dependencies]
syn = { version = "1.0.82", features = ["full", "visit"] }
syn = { version = "1.0.98", features = ["full", "visit"] }
quote = "1.0"
proc-macro2 = "1.0.37"
proc-macro-crate = "1.1.3"
Expand Down
2 changes: 1 addition & 1 deletion frame/staking/reward-curve/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ proc-macro = true
proc-macro-crate = "1.1.3"
proc-macro2 = "1.0.37"
quote = "1.0.10"
syn = { version = "1.0.82", features = ["full", "visit"] }
syn = { version = "1.0.98", features = ["full", "visit"] }

[dev-dependencies]
sp-runtime = { version = "6.0.0", path = "../../../primitives/runtime" }
2 changes: 1 addition & 1 deletion frame/support/procedural/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ proc-macro = true
Inflector = "0.11.4"
proc-macro2 = "1.0.37"
quote = "1.0.10"
syn = { version = "1.0.82", features = ["full"] }
syn = { version = "1.0.98", features = ["full"] }
frame-support-procedural-tools = { version = "4.0.0-dev", path = "./tools" }

[features]
Expand Down
2 changes: 1 addition & 1 deletion frame/support/procedural/tools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ targets = ["x86_64-unknown-linux-gnu"]
proc-macro-crate = "1.1.3"
proc-macro2 = "1.0.37"
quote = "1.0.10"
syn = { version = "1.0.82", features = ["full", "visit", "extra-traits"] }
syn = { version = "1.0.98", features = ["full", "visit", "extra-traits"] }
frame-support-procedural-tools-derive = { version = "3.0.0", path = "./derive" }
2 changes: 1 addition & 1 deletion frame/support/procedural/tools/derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ proc-macro = true
[dependencies]
proc-macro2 = "1.0.37"
quote = { version = "1.0.10", features = ["proc-macro"] }
syn = { version = "1.0.82", features = ["proc-macro", "full", "extra-traits", "parsing"] }
syn = { version = "1.0.98", features = ["proc-macro", "full", "extra-traits", "parsing"] }
9 changes: 5 additions & 4 deletions frame/support/procedural/tools/src/syn_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ macro_rules! groups_impl {

impl<P: Parse> Parse for $name<P> {
fn parse(input: ParseStream) -> Result<Self> {
let syn::group::$name { token, content } = syn::group::$parse(input)?;
let content;
let token = syn::$parse!(content in input);
let content = content.parse()?;
Ok($name { token, content })
}
Expand All @@ -71,9 +72,9 @@ macro_rules! groups_impl {
};
}

groups_impl!(Braces, Brace, Brace, parse_braces);
groups_impl!(Brackets, Bracket, Bracket, parse_brackets);
groups_impl!(Parens, Paren, Parenthesis, parse_parens);
groups_impl!(Braces, Brace, Brace, braced);
groups_impl!(Brackets, Bracket, Bracket, bracketed);
groups_impl!(Parens, Paren, Parenthesis, parenthesized);

#[derive(Debug)]
pub struct PunctuatedInner<P, T, V> {
Expand Down
2 changes: 1 addition & 1 deletion primitives/api/proc-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ proc-macro = true

[dependencies]
quote = "1.0.10"
syn = { version = "1.0.82", features = ["full", "fold", "extra-traits", "visit"] }
syn = { version = "1.0.98", features = ["full", "fold", "extra-traits", "visit"] }
proc-macro2 = "1.0.37"
blake2 = { version = "0.10.2", default-features = false }
proc-macro-crate = "1.1.3"
Expand Down
2 changes: 1 addition & 1 deletion primitives/core/hashing/proc-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ proc-macro = true
[dependencies]
proc-macro2 = "1.0.37"
quote = "1.0.6"
syn = { version = "1.0.82", features = ["full", "parsing"] }
syn = { version = "1.0.98", features = ["full", "parsing"] }
sp-core-hashing = { version = "4.0.0", default-features = false, path = "../" }
2 changes: 1 addition & 1 deletion primitives/debug-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ proc-macro = true

[dependencies]
quote = "1.0.10"
syn = "1.0.82"
syn = "1.0.98"
proc-macro2 = "1.0"

[features]
Expand Down
2 changes: 1 addition & 1 deletion primitives/runtime-interface/proc-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Inflector = "0.11.4"
proc-macro-crate = "1.1.3"
proc-macro2 = "1.0.37"
quote = "1.0.10"
syn = { version = "1.0.82", features = ["full", "visit", "fold", "extra-traits"] }
syn = { version = "1.0.98", features = ["full", "visit", "fold", "extra-traits"] }
2 changes: 1 addition & 1 deletion primitives/version/proc-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ proc-macro = true
codec = { package = "parity-scale-codec", version = "3.0.0", features = [ "derive" ] }
proc-macro2 = "1.0.37"
quote = "1.0.10"
syn = { version = "1.0.82", features = ["full", "fold", "extra-traits", "visit"] }
syn = { version = "1.0.98", features = ["full", "fold", "extra-traits", "visit"] }

[dev-dependencies]
sp-version = { version = "5.0.0", path = ".." }
2 changes: 1 addition & 1 deletion test-utils/derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description = "Substrate test utilities macros"
proc-macro-crate = "1.1.3"
proc-macro2 = "1.0.37"
quote = "1.0.10"
syn = { version = "1.0.82", features = ["full"] }
syn = { version = "1.0.98", features = ["full"] }

[lib]
proc-macro = true

0 comments on commit 814752f

Please sign in to comment.