Skip to content

Commit

Permalink
Switch from proc-macro-error to proc-macro-error2.
Browse files Browse the repository at this point in the history
This patch changes the dependency of proc-macro-error to be using
proc-macro-error2 instead. We are updating this dependency due to cargo
audit failures related to RUSTSEC-2024-0370[1] stating that
proc-macro-error is now considered unmaintained.

[1]: https://rustsec.org/advisories/RUSTSEC-2024-0370
  • Loading branch information
ahf authored and CensoredUsername committed Sep 27, 2024
1 parent 18173fb commit a7d1b22
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion plugin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ lazy_static = "1"
bitflags = "2"
byteorder = "1"
quote = "1"
proc-macro-error = "1"
proc-macro-error2 = "2.0"

[dependencies.syn]
version = "1"
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/arch/aarch64/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::parse_helpers::{as_ident, as_number, as_float, as_signed_number};
use syn::spanned::Spanned;
use quote::{quote, quote_spanned};
use proc_macro2::TokenStream;
use proc_macro_error::emit_error;
use proc_macro_error2::emit_error;

pub(super) fn compile_instruction(ctx: &mut Context, data: MatchData) -> Result<(), Option<String>> {
let mut cursor = 0usize;
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/arch/aarch64/matching.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use proc_macro_error::emit_error;
use proc_macro_error2::emit_error;
use proc_macro2::Span;

use super::Context;
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/arch/aarch64/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use syn::parse;
use proc_macro_error::emit_error;
use proc_macro_error2::emit_error;

mod ast;
mod parser;
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/arch/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use syn::parse;
use proc_macro_error::emit_error;
use proc_macro_error2::emit_error;

use crate::common::{Size, Stmt, Jump};
use crate::State;
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/arch/x64/compiler.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use syn::spanned::Spanned;
use proc_macro2::{Span, TokenTree, Literal};
use quote::{quote_spanned};
use proc_macro_error::emit_error;
use proc_macro_error2::emit_error;

use crate::common::{Stmt, Size, Jump, JumpKind, delimited};
use crate::serialize;
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/arch/x64/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use syn::parse;
use proc_macro_error::emit_error;
use proc_macro_error2::emit_error;

mod ast;
mod compiler;
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/arch/x64/parser.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use syn::{parse, Token};
use syn::spanned::Spanned;
use proc_macro2::Span;
use proc_macro_error::emit_error;
use proc_macro_error2::emit_error;

use lazy_static::lazy_static;

Expand Down
2 changes: 1 addition & 1 deletion plugin/src/directive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use std::collections::hash_map::Entry;

use syn::parse;
use syn::Token;
use proc_macro_error::emit_error;
use proc_macro2::{TokenTree, Literal};
use proc_macro_error2::emit_error;

use crate::common::{Stmt, Size, delimited};
use crate::arch;
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use syn::parse;
use syn::{Token, parse_macro_input};
use proc_macro2::{TokenTree, TokenStream};
use quote::quote;
use proc_macro_error::proc_macro_error;
use proc_macro_error2::proc_macro_error;

use std::collections::HashMap;

Expand Down

0 comments on commit a7d1b22

Please sign in to comment.