codegen: Ignore clippy::assert_is_empty lint

```
error: used `assert!` to check that a value is not empty
  --> tools/codegen/src/lib.rs:54:13
   |
54 |             assert!(!bin.as_slice().is_empty());
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assert_is_empty
   = note: `-D clippy::assert-is-empty` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::assert_is_empty)]`
help: use `assert_ne!` to show the value on failure
   |
54 -             assert!(!bin.as_slice().is_empty());
54 +             assert_ne!(bin.as_slice(), []);
   |
```
This commit is contained in:
Taiki Endo
2026-08-08 18:04:04 +09:00
parent 6c6fd71fe4
commit 583939ec0c
+1
View File
@@ -28,6 +28,7 @@ transmute_undefined_repr = "warn"
undocumented_unsafe_blocks = "warn" undocumented_unsafe_blocks = "warn"
unused_trait_names = "warn" unused_trait_names = "warn"
# Suppress buggy or noisy clippy lints # Suppress buggy or noisy clippy lints
assert_is_empty = { level = "allow", priority = 1 } # completely useless in assert_ne case
bool_assert_comparison = { level = "allow", priority = 1 } bool_assert_comparison = { level = "allow", priority = 1 }
borrow_as_ptr = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/8286 borrow_as_ptr = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/8286
cast_lossless = { level = "allow", priority = 1 } # suggested code has poor codegen with -C opt-level=0 https://godbolt.org/z/GzTxzbd9q cast_lossless = { level = "allow", priority = 1 } # suggested code has poor codegen with -C opt-level=0 https://godbolt.org/z/GzTxzbd9q