Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use proc-macro-error2 #723

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion crates/sol-macro-expander/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/sol-macro-expander/src/expand/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion crates/sol-macro-expander/src/expand/struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion crates/sol-macro-expander/src/expand/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
2 changes: 1 addition & 1 deletion crates/sol-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/sol-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down