diff --git a/Cargo.toml b/Cargo.toml index 3b95a2a92..4e607372e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,7 +55,7 @@ serde = { version = "1.0", default-features = false, features = ["alloc"] } serde_json = { version = "1.0", default-features = false, features = ["alloc"] } # macros -proc-macro-error = "1.0" +proc-macro-error2 = "2.0.0" proc-macro2 = "1.0" quote = "1.0" syn = "2.0" diff --git a/crates/sol-macro-expander/Cargo.toml b/crates/sol-macro-expander/Cargo.toml index 54d6efcd5..ca67190b2 100644 --- a/crates/sol-macro-expander/Cargo.toml +++ b/crates/sol-macro-expander/Cargo.toml @@ -31,7 +31,7 @@ syn = { workspace = true, features = ["extra-traits"] } heck = "0.5" hex.workspace = true indexmap = "2" -proc-macro-error.workspace = true +proc-macro-error2.workspace = true tiny-keccak = { workspace = true, features = ["keccak"] } # json diff --git a/crates/sol-macro-expander/src/expand/mod.rs b/crates/sol-macro-expander/src/expand/mod.rs index 5928588b8..86f9743a7 100644 --- a/crates/sol-macro-expander/src/expand/mod.rs +++ b/crates/sol-macro-expander/src/expand/mod.rs @@ -11,7 +11,7 @@ use ast::{ }; use indexmap::IndexMap; use proc_macro2::{Delimiter, Group, Ident, Punct, Spacing, Span, TokenStream, TokenTree}; -use proc_macro_error::{abort, emit_error}; +use proc_macro_error2::{abort, emit_error}; use quote::{format_ident, quote, TokenStreamExt}; use std::{ borrow::Borrow, diff --git a/crates/sol-macro-expander/src/expand/struct.rs b/crates/sol-macro-expander/src/expand/struct.rs index 00eb4d712..22a3c8b43 100644 --- a/crates/sol-macro-expander/src/expand/struct.rs +++ b/crates/sol-macro-expander/src/expand/struct.rs @@ -207,7 +207,7 @@ fn expand_encode_type_fns( Some(Item::Enum(_)) => *ty = Type::Uint(ty.span(), NonZeroU16::new(8)), Some(Item::Udt(udt)) => *ty = udt.ty.clone(), Some(item) => { - proc_macro_error::abort!(item.span(), "Invalid type in struct field: {:?}", item) + proc_macro_error2::abort!(item.span(), "Invalid type in struct field: {:?}", item) } } }); diff --git a/crates/sol-macro-expander/src/expand/ty.rs b/crates/sol-macro-expander/src/expand/ty.rs index 78f14e3ff..96170427a 100644 --- a/crates/sol-macro-expander/src/expand/ty.rs +++ b/crates/sol-macro-expander/src/expand/ty.rs @@ -3,7 +3,7 @@ use super::{ExpCtxt, ExternCrates}; use ast::{Item, Parameters, Spanned, Type, TypeArray}; use proc_macro2::{Ident, Literal, TokenStream}; -use proc_macro_error::abort; +use proc_macro_error2::abort; use quote::{quote_spanned, ToTokens}; use std::{fmt, num::NonZeroU16}; diff --git a/crates/sol-macro/Cargo.toml b/crates/sol-macro/Cargo.toml index d8e39123f..373c90cec 100644 --- a/crates/sol-macro/Cargo.toml +++ b/crates/sol-macro/Cargo.toml @@ -27,7 +27,7 @@ workspace = true alloy-sol-macro-input.workspace = true alloy-sol-macro-expander.workspace = true -proc-macro-error.workspace = true +proc-macro-error2.workspace = true proc-macro2.workspace = true quote.workspace = true syn = { workspace = true, features = ["extra-traits"] } diff --git a/crates/sol-macro/src/lib.rs b/crates/sol-macro/src/lib.rs index e2caf2bed..626861e6e 100644 --- a/crates/sol-macro/src/lib.rs +++ b/crates/sol-macro/src/lib.rs @@ -15,7 +15,7 @@ #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #[macro_use] -extern crate proc_macro_error; +extern crate proc_macro_error2; use alloy_sol_macro_expander::expand; use alloy_sol_macro_input::{SolAttrs, SolInput, SolInputExpander, SolInputKind};