Skip to content

Commit c90ba85

Browse files
David Tolnaymeta-codesync[bot]
authored andcommitted
Update proc-macro-error to proc-macro-error2
Summary: The `proc-macro-error` crate is unmaintained and only compatible with syn 1. `proc-macro-error2` supports syn 2. Reviewed By: cjlongoria Differential Revision: D93949190 fbshipit-source-id: a915f13147571c2fb664e3b23454118211826820
1 parent 8902efc commit c90ba85

5 files changed

Lines changed: 12 additions & 36 deletions

File tree

hphp/hack/src/Cargo.lock

Lines changed: 2 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hphp/hack/src/hackc/assemble/parse_macro.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ type TokenIter = std::iter::Peekable<IntoIter>;
5555
/// patterns translate into.
5656
#[cfg(not(test))]
5757
#[proc_macro]
58-
#[proc_macro_error::proc_macro_error]
58+
#[proc_macro_error2::proc_macro_error]
5959
pub fn parse(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
60-
use proc_macro_error::abort;
60+
use proc_macro_error2::abort;
6161
let input = TokenStream::from(input);
6262
let res = match parse_macro(input) {
6363
Ok(res) => res,
@@ -760,8 +760,8 @@ impl MyTokenIter for TokenIter {
760760
if let Some(t) = self.peek() {
761761
Ok(t)
762762
} else {
763-
proc_macro_error::Diagnostic::new(
764-
proc_macro_error::Level::Error,
763+
proc_macro_error2::Diagnostic::new(
764+
proc_macro_error2::Level::Error,
765765
"Token expected at end".into(),
766766
)
767767
.abort();

hphp/hack/src/hackc/cargo/parse_macro/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ doctest = false
1414
proc-macro = true
1515

1616
[dependencies]
17-
proc-macro-error = "1.0"
17+
proc-macro-error2 = "2.0.1"
1818
proc-macro2 = { version = "1.0.106", features = ["span-locations"] }
1919
quote = "1.0.44"

hphp/hack/src/hackc/ir/assemble/parse_macro.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ type TokenIter = std::iter::Peekable<IntoIter>;
5252
/// patterns translate into.
5353
#[cfg(not(test))]
5454
#[proc_macro]
55-
#[proc_macro_error::proc_macro_error]
55+
#[proc_macro_error2::proc_macro_error]
5656
pub fn parse(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
57-
use proc_macro_error::abort;
57+
use proc_macro_error2::abort;
5858
let input = TokenStream::from(input);
5959
let res = match parse_macro(input) {
6060
Ok(res) => res,
@@ -730,8 +730,8 @@ impl MyTokenIter for TokenIter {
730730
if let Some(t) = self.peek() {
731731
Ok(t)
732732
} else {
733-
proc_macro_error::Diagnostic::new(
734-
proc_macro_error::Level::Error,
733+
proc_macro_error2::Diagnostic::new(
734+
proc_macro_error2::Level::Error,
735735
"Token expected at end".into(),
736736
)
737737
.abort();

hphp/hack/src/hackc/ir/cargo/parse_macro/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ doctest = false
1414
proc-macro = true
1515

1616
[dependencies]
17-
proc-macro-error = "1.0"
17+
proc-macro-error2 = "2.0.1"
1818
proc-macro2 = { version = "1.0.106", features = ["span-locations"] }
1919
quote = "1.0.44"
2020

0 commit comments

Comments
 (0)