Skip to content

Commit

Permalink
chore: update crates
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Oct 18, 2023
1 parent 3220b0a commit 962c5e9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
16 changes: 8 additions & 8 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 crates/biome_diagnostics_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
32 changes: 16 additions & 16 deletions crates/biome_diagnostics_macros/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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!(
Expand All @@ -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;
}
Expand Down Expand Up @@ -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![,])?,
})
}
}
Expand Down Expand Up @@ -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![,])?,
})
}
}
Expand Down Expand Up @@ -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![|])?,
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/tests_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 962c5e9

Please sign in to comment.