-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
Description
In Linux, we use custom assert*!
macros for KUnit tests. The eq_op
lint only triggers for the standard ones, so e.g. the following doesn't lint:
fn f() {
macro_rules! assert_eq {
($l:expr, $r:expr) => {}
}
assert_eq!(1 + 1, 2);
}
https://godbolt.org/z/W99Wsvs4r
Could a list of custom macros for assert*!
ones be configured (similar to the lists for e.g. disallowed_macros
) so that lints know they should apply to those too?
This is similar to #11303, in the sense that it is another case of linting not applying with custom versions of standard macros.
Not sure if this should be considered a false negative for eq_op
or others, since it may be designed on purpose to only lint on the standard ones.
Version
rustc 1.87.0 (17067e9ac 2025-05-09)
Additional Labels
No response
Metadata
Metadata
Assignees
Labels
No labels