From 143cfa0534b066e5ae8a180612bf5448c3e28e16 Mon Sep 17 00:00:00 2001 From: Zyad Hassan Date: Thu, 5 Sep 2024 11:40:57 -0700 Subject: [PATCH] Replace proc-macro-error with proc-macro-error2 --- Cargo.lock | 46 ++++++++++++------------------- library/kani_macros/Cargo.toml | 2 +- library/kani_macros/src/derive.rs | 2 +- library/kani_macros/src/lib.rs | 4 +-- 4 files changed, 21 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1c371b85fba9..560ad32c310c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -176,7 +176,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.77", + "syn", ] [[package]] @@ -483,7 +483,7 @@ dependencies = [ "shell-words", "strum", "strum_macros", - "syn 2.0.77", + "syn", "tracing", "tracing-subscriber", "tracing-tree", @@ -538,10 +538,10 @@ dependencies = [ name = "kani_macros" version = "0.55.0" dependencies = [ - "proc-macro-error", + "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.77", + "syn", ] [[package]] @@ -801,27 +801,25 @@ dependencies = [ ] [[package]] -name = "proc-macro-error" -version = "1.0.4" +name = "proc-macro-error-attr2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" dependencies = [ - "proc-macro-error-attr", "proc-macro2", "quote", - "syn 1.0.109", - "version_check", ] [[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +name = "proc-macro-error2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "74cdd32837fa2e86ec09c8266e5aad92400ac934c6dbca83d54673b298db3e45" dependencies = [ + "proc-macro-error-attr2", "proc-macro2", "quote", - "version_check", + "syn", ] [[package]] @@ -1029,7 +1027,7 @@ checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn", ] [[package]] @@ -1136,17 +1134,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.77", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "unicode-ident", + "syn", ] [[package]] @@ -1190,7 +1178,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn", ] [[package]] @@ -1287,7 +1275,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn", ] [[package]] @@ -1574,5 +1562,5 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn", ] diff --git a/library/kani_macros/Cargo.toml b/library/kani_macros/Cargo.toml index a6b20a68bc39..a1aeb743952b 100644 --- a/library/kani_macros/Cargo.toml +++ b/library/kani_macros/Cargo.toml @@ -13,7 +13,7 @@ proc-macro = true [dependencies] proc-macro2 = "1.0" -proc-macro-error = "1.0.4" +proc-macro-error2 = "2.0.0" quote = "1.0.20" syn = { version = "2.0.18", features = ["full", "visit-mut", "visit", "extra-traits"] } diff --git a/library/kani_macros/src/derive.rs b/library/kani_macros/src/derive.rs index cc936560e510..e89f6f089795 100644 --- a/library/kani_macros/src/derive.rs +++ b/library/kani_macros/src/derive.rs @@ -10,7 +10,7 @@ //! //! ``` use proc_macro2::{Ident, Span, TokenStream}; -use proc_macro_error::abort; +use proc_macro_error2::abort; use quote::{quote, quote_spanned}; use syn::spanned::Spanned; use syn::{ diff --git a/library/kani_macros/src/lib.rs b/library/kani_macros/src/lib.rs index 63ed990a4840..8a1d2d80f864 100644 --- a/library/kani_macros/src/lib.rs +++ b/library/kani_macros/src/lib.rs @@ -12,7 +12,7 @@ mod derive; // proc_macro::quote is nightly-only, so we'll cobble things together instead use proc_macro::TokenStream; -use proc_macro_error::proc_macro_error; +use proc_macro_error2::proc_macro_error; #[cfg(kani_sysroot)] use sysroot as attr_impl; @@ -398,7 +398,7 @@ pub fn modifies(attr: TokenStream, item: TokenStream) -> TokenStream { /// This code should only be activated when pre-building Kani's sysroot. #[cfg(kani_sysroot)] mod sysroot { - use proc_macro_error::{abort, abort_call_site}; + use proc_macro_error2::{abort, abort_call_site}; mod contracts;