Add relative_path_in_macro_definition lint (#14472) by KunWuChan · Pull Request #14645 · rust-lang/rust-clippy

added 5 commits

April 17, 2025 17:44
Implement 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 KunWuChan closed this by deleting the head repository

Apr 18, 2025

@ojeda ojeda mentioned this pull request

May 18, 2025

71 tasks