Add relative_path_in_macro_definition lint (#14472) by KunWuChan · Pull Request #14645 · rust-lang/rust-clippy
added 5 commits
April 17, 2025 17:44Implement lint to warn about relative `core`/`kernel` paths in macro definitions. Fixes #14472 Signed-off-by: Kunwu Chan <kunwu.chan@hotmail.com> Co-developed-by: Grace Deng <Grace.Deng006@Gmail.com> Signed-off-by: Grace Deng <Grace.Deng006@Gmail.com>
Create `tests/ui/relative_path_in_macro_definition.rs` with positive and negative cases to verify lint behavior. Signed-off-by: Kunwu Chan <kunwu.chan@hotmail.com> Co-developed-by: Grace Deng <Grace.Deng006@Gmail.com> Signed-off-by: Grace Deng <Grace.Deng006@Gmail.com>
Add `#![allow(clippy::relative_path_in_macro_definition)]` to `incompatible_msrv.rs`, `swap_ptr_to_ref_unfixable.rs`, and `arithmetic_side_effects.rs` to avoid lint interference. Update corresponding `.stderr` files. Signed-off-by: Kunwu Chan <kunwu.chan@hotmail.com> Co-developed-by: Grace Deng <Grace.Deng006@Gmail.com> Signed-off-by: Grace Deng <Grace.Deng006@Gmail.com>
KunWuChan
closed this by deleting the head repository
ojeda
mentioned this pull request
71 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters