From 67be5263a68c14e3321b10931f4868fe4860d6db Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 28 Nov 2023 15:53:02 -0800 Subject: [PATCH] Update proc-macro2 to 1.0.70 Summary: This release includes a fix to `proc_macro2::Ident::new` to report invalid input at the call site using #[track_caller], instead of inside proc-macro2 code. This affects LLVM staging (which is LLVM 18) because old bindgen (<0.62.0) is incompatible with Clang 16+, manifesting as panicks in `Ident::new`. See {D40685340}. **Before:** ``` Action failed: fbsource//third-party/rust:loopdev-0.4.0-build-script-run (buildscript) thread 'main' panicked at '"enum_(unnamed_at_/usr/include/linux/loop_h_21_1)" is not a valid Ident', third-party/rust/vendor/proc-macro2-1.0.69/src/fallback.rs:817:9 Action failed: fbsource//third-party/rust:virt-sys-0.1.0-build-script-run (buildscript) thread 'main' panicked at '"_virTypedParameter_union_(unnamed_at___/__/__/__/__/__/fbcode/ca3f1b68f56b9220/third-party-buck/platform010/build/libvirt/__include__/include/include/libvirt/libvirt-common_h_206_5)" is not a valid Ident', third-party/rust/vendor/proc-macro2-1.0.69/src/fallback.rs:817:9 ``` **After:** ``` Action failed: fbsource//third-party/rust:loopdev-0.4.0-build-script-run (buildscript) thread 'main' panicked at '"enum_(unnamed_at_/usr/include/linux/loop_h_21_1)" is not a valid Ident', third-party/rust/vendor/bindgen-0.59.2/src/ir/context.rs:878:9 Action failed: fbsource//third-party/rust:virt-sys-0.1.0-build-script-run (buildscript) thread 'main' panicked at '"_virTypedParameter_union_(unnamed_at___/__/__/__/__/__/fbcode/ca3f1b68f56b9220/third-party-buck/platform010/build/libvirt/__include__/include/include/libvirt/libvirt-common_h_206_5)" is not a valid Ident', third-party/rust/vendor/bindgen-0.59.2/src/ir/context.rs:878:9 ``` Of course, that panic still needs to be fixed properly. I will pursue that next. But at least the location of the faulty code is reported correctly. Reviewed By: zertosh Differential Revision: D51633230 fbshipit-source-id: db9794ed4ea70f773925bdaf9a11de289d2aa25c --- shed/facet/proc_macros/Cargo.toml | 2 +- shed/fbinit/fbinit_macros/Cargo.toml | 2 +- shed/quickcheck_arbitrary_derive/Cargo.toml | 2 +- shed/scuba_sample/derive/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shed/facet/proc_macros/Cargo.toml b/shed/facet/proc_macros/Cargo.toml index 73727d76e..c37630635 100644 --- a/shed/facet/proc_macros/Cargo.toml +++ b/shed/facet/proc_macros/Cargo.toml @@ -17,6 +17,6 @@ proc-macro = true [dependencies] proc-macro-crate = "1.1.0" -proc-macro2 = { version = "1.0.64", features = ["span-locations"] } +proc-macro2 = { version = "1.0.70", features = ["span-locations"] } quote = "1.0.29" syn = { version = "1.0.109", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } diff --git a/shed/fbinit/fbinit_macros/Cargo.toml b/shed/fbinit/fbinit_macros/Cargo.toml index a8c72cd82..69c1db2a1 100644 --- a/shed/fbinit/fbinit_macros/Cargo.toml +++ b/shed/fbinit/fbinit_macros/Cargo.toml @@ -17,6 +17,6 @@ doctest = false proc-macro = true [dependencies] -proc-macro2 = { version = "1.0.64", features = ["span-locations"] } +proc-macro2 = { version = "1.0.70", features = ["span-locations"] } quote = "1.0.29" syn = { version = "1.0.109", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } diff --git a/shed/quickcheck_arbitrary_derive/Cargo.toml b/shed/quickcheck_arbitrary_derive/Cargo.toml index e1b07a1d3..0032d4e0f 100644 --- a/shed/quickcheck_arbitrary_derive/Cargo.toml +++ b/shed/quickcheck_arbitrary_derive/Cargo.toml @@ -19,7 +19,7 @@ name = "quickcheck_arbitrary_example" path = "examples/example.rs" [dependencies] -proc-macro2 = { version = "1.0.64", features = ["span-locations"] } +proc-macro2 = { version = "1.0.70", features = ["span-locations"] } quickcheck = "1.0" quote = "1.0.29" syn = { version = "1.0.109", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } diff --git a/shed/scuba_sample/derive/Cargo.toml b/shed/scuba_sample/derive/Cargo.toml index 7987a5080..995732e0a 100644 --- a/shed/scuba_sample/derive/Cargo.toml +++ b/shed/scuba_sample/derive/Cargo.toml @@ -18,6 +18,6 @@ proc-macro = true [dependencies] darling = "0.14.0" itertools = "0.11.0" -proc-macro2 = { version = "1.0.64", features = ["span-locations"] } +proc-macro2 = { version = "1.0.70", features = ["span-locations"] } quote = "1.0.29" syn = { version = "1.0.109", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] }