From f6605656b3be1ccccf3b8d4e9bf632fbe61d08eb Mon Sep 17 00:00:00 2001 From: yassun7010 Date: Sat, 7 Sep 2024 09:54:55 +0900 Subject: [PATCH] feat: use proc_macro_error2. --- serde_valid_derive/Cargo.toml | 2 +- serde_valid_derive/src/lib.rs | 2 +- serde_valid_derive/src/types/field/named.rs | 2 +- serde_valid_derive/src/types/field/unnamed.rs | 2 +- serde_valid_derive/src/types/single_ident_path.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/serde_valid_derive/Cargo.toml b/serde_valid_derive/Cargo.toml index c0d7ecd7..d7a986c9 100644 --- a/serde_valid_derive/Cargo.toml +++ b/serde_valid_derive/Cargo.toml @@ -18,7 +18,7 @@ proc-macro = true [dependencies] itertools.workspace = true paste.workspace = true -proc-macro-error = "^1.0" +proc-macro-error2 = { version = "2.0.0", default-features = false } proc-macro2 = "^1.0" quote = "^1.0" strsim = "0.11.0" diff --git a/serde_valid_derive/src/lib.rs b/serde_valid_derive/src/lib.rs index 77319c71..df028e48 100644 --- a/serde_valid_derive/src/lib.rs +++ b/serde_valid_derive/src/lib.rs @@ -10,7 +10,7 @@ use derive::expand_derive; use error::to_compile_errors; use error::{Error, Errors}; use proc_macro::TokenStream; -use proc_macro_error::proc_macro_error; +use proc_macro_error2::proc_macro_error; use syn::{parse_macro_input, DeriveInput}; #[proc_macro_derive(Validate, attributes(rule, validate, serde_valid))] diff --git a/serde_valid_derive/src/types/field/named.rs b/serde_valid_derive/src/types/field/named.rs index 00b26dc5..8eeeb3c9 100644 --- a/serde_valid_derive/src/types/field/named.rs +++ b/serde_valid_derive/src/types/field/named.rs @@ -1,5 +1,5 @@ use super::Field; -use proc_macro_error::abort; +use proc_macro_error2::abort; use quote::quote; use std::borrow::Cow; use syn::spanned::Spanned; diff --git a/serde_valid_derive/src/types/field/unnamed.rs b/serde_valid_derive/src/types/field/unnamed.rs index 347f3fc4..15f36a02 100644 --- a/serde_valid_derive/src/types/field/unnamed.rs +++ b/serde_valid_derive/src/types/field/unnamed.rs @@ -1,5 +1,5 @@ use super::Field; -use proc_macro_error::abort; +use proc_macro_error2::abort; use quote::quote; use std::borrow::Cow; use std::convert::AsRef; diff --git a/serde_valid_derive/src/types/single_ident_path.rs b/serde_valid_derive/src/types/single_ident_path.rs index a038ddd5..91554d9a 100644 --- a/serde_valid_derive/src/types/single_ident_path.rs +++ b/serde_valid_derive/src/types/single_ident_path.rs @@ -1,4 +1,4 @@ -use proc_macro_error::abort; +use proc_macro_error2::abort; use syn::spanned::Spanned; pub struct SingleIdentPath<'a>(&'a syn::Path);