Skip to content

Commit 031854f

Browse files
authored
Switch proc-macro-error to proc-macro-error2 (#493)
1 parent 5fd96c7 commit 031854f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

mlua_derive/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ license = "MIT"
1212
proc-macro = true
1313

1414
[features]
15-
macros = ["proc-macro-error", "itertools", "regex", "once_cell"]
15+
macros = ["proc-macro-error2", "itertools", "regex", "once_cell"]
1616

1717
[dependencies]
1818
quote = "1.0"
1919
proc-macro2 = { version = "1.0", features = ["span-locations"] }
20-
proc-macro-error = { version = "1.0", optional = true }
20+
proc-macro-error2 = { version = "2.0.1", optional = true }
2121
syn = { version = "2.0", features = ["full"] }
2222
itertools = { version = "0.13", optional = true }
2323
regex = { version = "1.4", optional = true }

mlua_derive/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use syn::{parse_macro_input, ItemFn, LitStr, Result};
77
#[cfg(feature = "macros")]
88
use {
99
crate::chunk::Chunk, proc_macro::TokenTree, proc_macro2::TokenStream as TokenStream2,
10-
proc_macro_error::proc_macro_error,
10+
proc_macro_error2::proc_macro_error,
1111
};
1212

1313
#[derive(Default)]

mlua_derive/src/token.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ fn parse_pos(span: &Span) -> Option<(usize, usize)> {
7474
fn fallback_span_pos(span: &Span) -> (Pos, Pos) {
7575
let (start, end) = match parse_pos(span) {
7676
Some(v) => v,
77-
None => proc_macro_error::abort_call_site!("Cannot retrieve span information; please use nightly"),
77+
None => proc_macro_error2::abort_call_site!("Cannot retrieve span information; please use nightly"),
7878
};
7979
(Pos::new(1, start), Pos::new(1, end))
8080
}

0 commit comments

Comments
 (0)