From 9e2575e463f0302cfa357f0ce103d4f504929363 Mon Sep 17 00:00:00 2001 From: Tait Hoyem Date: Sat, 24 Aug 2024 10:06:15 -0600 Subject: [PATCH 1/2] Update packages so that syn is on 2.x --- Cargo.toml | 2 +- const_panic_proc_macros/Cargo.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e59e9e8..33ce3fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ include = [ [workspace] [dependencies.typewit] -version = "1.1.0" +version = "1.9.0" optional = true [dependencies.const_panic_proc_macros] diff --git a/const_panic_proc_macros/Cargo.toml b/const_panic_proc_macros/Cargo.toml index 19c2a0d..a6d664d 100644 --- a/const_panic_proc_macros/Cargo.toml +++ b/const_panic_proc_macros/Cargo.toml @@ -22,8 +22,8 @@ travis-ci = { repository = "rodrimati1992/const_format_crates/" } proc-macro = true [dependencies] -quote = "1.0.7" -proc-macro2 = "1.0.19" +quote = "1.0.37" +proc-macro2 = "1.0.86" unicode-xid = "0.2" [dependencies.syn] From 131c4d654f3b1debef20cb0d747e0ba87725dc90 Mon Sep 17 00:00:00 2001 From: Tait Hoyem Date: Sat, 24 Aug 2024 10:19:02 -0600 Subject: [PATCH 2/2] Use new syn interfaces --- const_panic_proc_macros/Cargo.toml | 4 ++-- const_panic_proc_macros/src/derive_debug/attribute_parsing.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/const_panic_proc_macros/Cargo.toml b/const_panic_proc_macros/Cargo.toml index a6d664d..5ad4f86 100644 --- a/const_panic_proc_macros/Cargo.toml +++ b/const_panic_proc_macros/Cargo.toml @@ -24,8 +24,8 @@ proc-macro = true [dependencies] quote = "1.0.37" proc-macro2 = "1.0.86" -unicode-xid = "0.2" +unicode-xid = "0.2.5" [dependencies.syn] -version = "1.0.38" +version = "2.0" diff --git a/const_panic_proc_macros/src/derive_debug/attribute_parsing.rs b/const_panic_proc_macros/src/derive_debug/attribute_parsing.rs index aaaab29..32e23c6 100644 --- a/const_panic_proc_macros/src/derive_debug/attribute_parsing.rs +++ b/const_panic_proc_macros/src/derive_debug/attribute_parsing.rs @@ -113,11 +113,11 @@ fn parse_attribute<'a>( ctx: ParseCtx<'a>, attribute: &Attribute, ) -> syn::Result<()> { - if attribute.path.is_ident("pfmt") { + if attribute.path().is_ident("pfmt") { let closure = move |input: &'_ ParseBuffer<'_>| parse_helper_attribute(this, ds, ctx, input); - if attribute.tokens.is_empty() { + if attribute.to_token_stream().is_empty() { Parser::parse2(closure, crate::TokenStream2::new()) } else { attribute.parse_args_with(closure)