Skip to content

Commit 33f9300

Browse files
authored
Fix incorrect use of syn::exports (#7838)
* Fix incorrect use of syn::exports Instead of using `syn::exports` we should import the trait from the quote crate directly. * Use own macro for test cases to fix compilation with latest syn * Fix test
1 parent 1026f0b commit 33f9300

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

procedural/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ frame-support-procedural-tools = { version = "2.0.0", path = "./tools" }
1919
proc-macro2 = "1.0.6"
2020
quote = "1.0.3"
2121
Inflector = "0.11.4"
22-
syn = { version = "1.0.7", features = ["full"] }
22+
syn = { version = "1.0.58", features = ["full"] }
2323

2424
[features]
2525
default = ["std"]

procedural/src/storage/parse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ mod keyword {
4747
pub struct Opt<P> {
4848
pub inner: Option<P>,
4949
}
50-
impl<P: syn::export::ToTokens> syn::export::ToTokens for Opt<P> {
50+
impl<P: quote::ToTokens> quote::ToTokens for Opt<P> {
5151
fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) {
5252
if let Some(ref p) = self.inner {
5353
p.to_tokens(tokens);

procedural/tools/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ targets = ["x86_64-unknown-linux-gnu"]
1515
frame-support-procedural-tools-derive = { version = "2.0.0", path = "./derive" }
1616
proc-macro2 = "1.0.6"
1717
quote = "1.0.3"
18-
syn = { version = "1.0.7", features = ["full", "visit"] }
18+
syn = { version = "1.0.58", features = ["full", "visit"] }
1919
proc-macro-crate = "0.1.5"

procedural/tools/derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ proc-macro = true
1717
[dependencies]
1818
proc-macro2 = "1.0.6"
1919
quote = { version = "1.0.3", features = ["proc-macro"] }
20-
syn = { version = "1.0.7", features = ["proc-macro" ,"full", "extra-traits", "parsing"] }
20+
syn = { version = "1.0.58", features = ["proc-macro" ,"full", "extra-traits", "parsing"] }

0 commit comments

Comments
 (0)