From 6775d315ed80dc16aaa2604a296d32830db2d3f5 Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Thu, 11 Dec 2025 10:54:44 -0500 Subject: [PATCH 1/2] test: update to `proc_macro::tracked::path` Changed accordingly to https://github.com/rust-lang/rust/pull/149400 --- tests/testsuite/dep_info.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/testsuite/dep_info.rs b/tests/testsuite/dep_info.rs index fd150170b54..85c5d567b82 100644 --- a/tests/testsuite/dep_info.rs +++ b/tests/testsuite/dep_info.rs @@ -588,7 +588,7 @@ fn no_trailing_separator_after_package_root_build_script() { ); } -#[cargo_test(nightly, reason = "proc_macro::tracked_path is unstable")] +#[cargo_test(nightly, reason = "proc_macro::tracked::path is unstable")] fn no_trailing_separator_after_package_root_proc_macro() { let p = project() .file( @@ -626,13 +626,13 @@ fn no_trailing_separator_after_package_root_proc_macro() { .file( "pm/src/lib.rs", r#" - #![feature(track_path)] + #![feature(proc_macro_tracked_path)] extern crate proc_macro; use proc_macro::TokenStream; #[proc_macro] pub fn noop(_item: TokenStream) -> TokenStream { - proc_macro::tracked_path::path( + proc_macro::tracked::path( std::env::current_dir().unwrap().to_str().unwrap() ); "".parse().unwrap() From f77d571b83764922cee7482a6809357d62404dfe Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Thu, 11 Dec 2025 11:09:06 -0500 Subject: [PATCH 2/2] test: fix clippy warnings ``` error: this assertion has a constant value --> crates/build-rs-test-lib/src/lib.rs:3:5 | 3 | assert!(cfg!(did_run_build_script)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider moving this into a const block: `const { assert!(..) }` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#assertions_on_constants = note: `-D clippy::assertions-on-constants` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::assertions_on_constants)]` ``` A bit annoying we can't have `lint.workspace = true` for this crate yet --- crates/build-rs-test-lib/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/build-rs-test-lib/src/lib.rs b/crates/build-rs-test-lib/src/lib.rs index 871cc4ee586..a9297b6a17b 100644 --- a/crates/build-rs-test-lib/src/lib.rs +++ b/crates/build-rs-test-lib/src/lib.rs @@ -1,4 +1,4 @@ #[test] fn test() { - assert!(cfg!(did_run_build_script)); + const { assert!(cfg!(did_run_build_script)) }; }