feat: make const_is_empty lint ignore external constants

This commit is contained in:
Samuel Tardieu 2024-02-26 09:47:13 +01:00
parent 1159e2c00f
commit 898ed8825d
2 changed files with 16 additions and 0 deletions

View file

@ -167,3 +167,8 @@ fn const_expressions() {
let _ = const_rand().is_empty();
// Do not lint, we do not recurse into functions
}
fn constant_from_external_crate() {
let _ = std::env::consts::EXE_EXTENSION.is_empty();
// Do not lint, `exe_ext` comes from the `std` crate
}