From 031854fa2a4ffcb0a9bb24f7c9537310f03d1933 Mon Sep 17 00:00:00 2001 From: Evie <14899090+evie-calico@users.noreply.github.com> Date: Sat, 30 Nov 2024 17:37:40 -0500 Subject: [PATCH] Switch proc-macro-error to proc-macro-error2 (#493) --- mlua_derive/Cargo.toml | 4 ++-- mlua_derive/src/lib.rs | 2 +- mlua_derive/src/token.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mlua_derive/Cargo.toml b/mlua_derive/Cargo.toml index 773351e7..28a10490 100644 --- a/mlua_derive/Cargo.toml +++ b/mlua_derive/Cargo.toml @@ -12,12 +12,12 @@ license = "MIT" proc-macro = true [features] -macros = ["proc-macro-error", "itertools", "regex", "once_cell"] +macros = ["proc-macro-error2", "itertools", "regex", "once_cell"] [dependencies] quote = "1.0" proc-macro2 = { version = "1.0", features = ["span-locations"] } -proc-macro-error = { version = "1.0", optional = true } +proc-macro-error2 = { version = "2.0.1", optional = true } syn = { version = "2.0", features = ["full"] } itertools = { version = "0.13", optional = true } regex = { version = "1.4", optional = true } diff --git a/mlua_derive/src/lib.rs b/mlua_derive/src/lib.rs index 4d3bfb29..af54bedf 100644 --- a/mlua_derive/src/lib.rs +++ b/mlua_derive/src/lib.rs @@ -7,7 +7,7 @@ use syn::{parse_macro_input, ItemFn, LitStr, Result}; #[cfg(feature = "macros")] use { crate::chunk::Chunk, proc_macro::TokenTree, proc_macro2::TokenStream as TokenStream2, - proc_macro_error::proc_macro_error, + proc_macro_error2::proc_macro_error, }; #[derive(Default)] diff --git a/mlua_derive/src/token.rs b/mlua_derive/src/token.rs index 19f3f05f..c6ce7c97 100644 --- a/mlua_derive/src/token.rs +++ b/mlua_derive/src/token.rs @@ -74,7 +74,7 @@ fn parse_pos(span: &Span) -> Option<(usize, usize)> { fn fallback_span_pos(span: &Span) -> (Pos, Pos) { let (start, end) = match parse_pos(span) { Some(v) => v, - None => proc_macro_error::abort_call_site!("Cannot retrieve span information; please use nightly"), + None => proc_macro_error2::abort_call_site!("Cannot retrieve span information; please use nightly"), }; (Pos::new(1, start), Pos::new(1, end)) }