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

Replace proc-macro-error crate with proc-macro-error2 #148

Merged
merged 1 commit into from
Oct 30, 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 derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ darling = "0.20.1"
heck = "0.4.0"
num-bigint = "0.4.3"
proc-macro-crate = "3"
proc-macro-error = "1"
proc-macro-error2 = "2.0.1"
proc-macro2 = "1.0.42"
quote = "1.0.9"
syn = { version = "2.0", features = ["full"] }
Expand Down
2 changes: 1 addition & 1 deletion derive/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use proc_macro2::Span;
use proc_macro_error::{Diagnostic, Level};
use proc_macro_error2::{Diagnostic, Level};

#[derive(Debug, thiserror::Error)]
pub enum Error {
Expand Down
2 changes: 1 addition & 1 deletion derive/src/from_row/structs/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use darling::FromAttributes;
use proc_macro2::{Span, TokenStream};
use proc_macro_error::abort;
use proc_macro_error2::abort;
use quote::{ToTokens, TokenStreamExt};
use syn::ext::IdentExt;
use syn::spanned::Spanned;
Expand Down
2 changes: 1 addition & 1 deletion derive/src/from_value/enums/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use attrs::{
use darling::{FromAttributes, FromMeta};
use num_bigint::BigInt;
use proc_macro2::{Span, TokenStream};
use proc_macro_error::abort;
use proc_macro_error2::abort;
use quote::{ToTokens, TokenStreamExt};
use syn::spanned::Spanned;

Expand Down
2 changes: 1 addition & 1 deletion derive/src/from_value/structs/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use darling::FromMeta;
use heck::AsSnakeCase;
use proc_macro2::{Span, TokenStream};
use proc_macro_error::abort;
use proc_macro_error2::abort;
use quote::{ToTokens, TokenStreamExt};

use super::enums::attrs::container::Crate;
Expand Down
6 changes: 3 additions & 3 deletions derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

extern crate proc_macro;

use proc_macro_error::abort;
use proc_macro_error2::abort;

use crate::error::Error;
type Result<T> = std::result::Result<T, crate::error::Error>;
Expand All @@ -15,7 +15,7 @@ mod from_value;

/// Derives `FromValue`. See `mysql_common` crate-level docs for more info.
#[proc_macro_derive(FromValue, attributes(mysql))]
#[proc_macro_error::proc_macro_error]
#[proc_macro_error2::proc_macro_error]
pub fn from_value(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let input: syn::DeriveInput = syn::parse(input).unwrap();
match from_value::impl_from_value(&input) {
Expand All @@ -26,7 +26,7 @@ pub fn from_value(input: proc_macro::TokenStream) -> proc_macro::TokenStream {

/// Derives `FromRow`. See `mysql_common` crate-level docs for more info.
#[proc_macro_derive(FromRow, attributes(mysql))]
#[proc_macro_error::proc_macro_error]
#[proc_macro_error2::proc_macro_error]
pub fn from_row(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let input: syn::DeriveInput = syn::parse(input).unwrap();
match from_row::impl_from_row(&input) {
Expand Down