From 962c5e948e80e96027d90b177f7bd9aa545c9479 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Wed, 18 Oct 2023 11:10:30 +0100 Subject: [PATCH] chore: update crates --- Cargo.lock | 16 +++++----- crates/biome_diagnostics_macros/Cargo.toml | 2 +- crates/biome_diagnostics_macros/src/parse.rs | 32 ++++++++++---------- crates/tests_macros/Cargo.toml | 2 +- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fe01c7cb25c1..7f3cc1cf5d5e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -310,7 +310,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.38", ] [[package]] @@ -827,7 +827,7 @@ checksum = "22cbaba260bbcbb69b0d54e9f0d83038a4568f3a5d1c95591fed5e8fee964539" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.38", ] [[package]] @@ -2143,9 +2143,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -2590,7 +2590,7 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.38", ] [[package]] @@ -2745,9 +2745,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.32" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239814284fd6f1a4ffe4ca893952cdd93c224b6a1571c9a9eadd670295c0c9e2" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -2795,7 +2795,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.38", ] [[package]] diff --git a/crates/biome_diagnostics_macros/Cargo.toml b/crates/biome_diagnostics_macros/Cargo.toml index 1a4b81a90448..771be0d8a361 100644 --- a/crates/biome_diagnostics_macros/Cargo.toml +++ b/crates/biome_diagnostics_macros/Cargo.toml @@ -17,4 +17,4 @@ proc-macro = true proc-macro-error = { version = "1.0.4", default-features = false } proc-macro2 = "1.0.63" quote = "1.0.14" -syn = "1.0.85" +syn = "2.0.37" diff --git a/crates/biome_diagnostics_macros/src/parse.rs b/crates/biome_diagnostics_macros/src/parse.rs index 8a5180ee7adc..03da1cfec3b8 100644 --- a/crates/biome_diagnostics_macros/src/parse.rs +++ b/crates/biome_diagnostics_macros/src/parse.rs @@ -42,9 +42,9 @@ impl DeriveInput { }; for attr in input.attrs { - if attr.path.is_ident("diagnostic") { - let tokens = attr.tokens.into(); - let attrs = match DiagnosticAttrs::parse.parse(tokens) { + if attr.path().is_ident("diagnostic") { + let tokens = attr.into_token_stream(); + let attrs = match DiagnosticAttrs::parse.parse2(tokens) { Ok(attrs) => attrs, Err(err) => abort!( err.span(), @@ -114,38 +114,38 @@ impl DeriveInput { }; for attr in field.attrs { - if attr.path.is_ident("category") { + if attr.path().is_ident("category") { result.category = Some(StaticOrDynamic::Dynamic(ident.clone())); continue; } - if attr.path.is_ident("severity") { + if attr.path().is_ident("severity") { result.severity = Some(StaticOrDynamic::Dynamic(ident.clone())); continue; } - if attr.path.is_ident("description") { + if attr.path().is_ident("description") { result.description = Some(StaticOrDynamic::Dynamic(ident.clone())); continue; } - if attr.path.is_ident("message") { + if attr.path().is_ident("message") { result.message = Some(StaticOrDynamic::Dynamic(ident.clone())); continue; } - if attr.path.is_ident("advice") { + if attr.path().is_ident("advice") { result.advices.push(ident.clone()); continue; } - if attr.path.is_ident("verbose_advice") { + if attr.path().is_ident("verbose_advice") { result.verbose_advices.push(ident.clone()); continue; } - if attr.path.is_ident("location") { - let tokens = attr.tokens.into(); + if attr.path().is_ident("location") { + let tokens = attr.into_token_stream().into(); let attr = match LocationAttr::parse.parse(tokens) { Ok(attr) => attr, Err(err) => abort!( @@ -159,12 +159,12 @@ impl DeriveInput { continue; } - if attr.path.is_ident("tags") { + if attr.path().is_ident("tags") { result.tags = Some(StaticOrDynamic::Dynamic(ident.clone())); continue; } - if attr.path.is_ident("source") { + if attr.path().is_ident("source") { result.source = Some(ident.clone()); continue; } @@ -208,7 +208,7 @@ impl Parse for DiagnosticAttrs { let content; Ok(Self { _paren_token: syn::parenthesized!(content in input), - attrs: content.parse_terminated(DiagnosticAttr::parse)?, + attrs: content.parse_terminated(DiagnosticAttr::parse, Token![,])?, }) } } @@ -319,7 +319,7 @@ impl Parse for SplitMessageAttrs { let content; Ok(Self { _paren_token: syn::parenthesized!(content in input), - attrs: content.parse_terminated(SplitMessageAttr::parse)?, + attrs: content.parse_terminated(SplitMessageAttr::parse, Token![,])?, }) } } @@ -368,7 +368,7 @@ impl Parse for TagsAttr { let content; Ok(Self { _paren_token: syn::parenthesized!(content in input), - tags: content.parse_terminated(Ident::parse)?, + tags: content.parse_terminated(Ident::parse, Token![|])?, }) } } diff --git a/crates/tests_macros/Cargo.toml b/crates/tests_macros/Cargo.toml index bc5c4af374c8..aff37e26fa74 100644 --- a/crates/tests_macros/Cargo.toml +++ b/crates/tests_macros/Cargo.toml @@ -19,4 +19,4 @@ globwalk = "0.8.1" proc-macro-error = "1.0.4" proc-macro2 = "1.0.63" quote = "1.0.14" -syn = "1.0.85" +syn = "2.0.37"