rust-clippy
rust-clippy copied to clipboard
New lint `const_is_empty`
This lint detects calls to .is_empty()
on an entity initialized from a string literal and flag them as suspicious. To avoid triggering on macros called from generated code, it checks that the .is_empty()
receiver, the call itself and the initialization come from the same context.
Fixes #12307
changelog: [const_is_empty
]: new lint