feat: make const_is_empty lint ignore external constants
This commit is contained in:
parent
1159e2c00f
commit
898ed8825d
2 changed files with 16 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue