#414 left this crate as the reason the `-D warnings` gate covers
loader-gguf on default features only: clippy reports it through the path
dependency, so gating the `fabric-meter` configuration needs it clean too.
I described its warnings in #414 as "unused in THAT configuration and
needed in others, so they want cfg work rather than deletion". That was
wrong on two counts, and measuring it directly settled both:
- the crate has NO `[features]` at all, only a macOS-conditional
dependency block, so there is one configuration and the unused items
are unconditionally unused;
- there are 84 of them, not 43. The 43 was what leaked through
loader-gguf's lint, not the crate's own count.
82 of the 84 are in mps_matmul.rs.
41 came from clippy's own suggestions (manual_is_multiple_of 23,
unnecessary_cast 8, needless_option_as_deref 3, excessive_precision,
doc_lazy_continuation, double_parens, chunks_exact_to_as_chunks).
The other 42 -- 27 `unused_unsafe` and 15 `unused_imports` -- carry no
machine-applicable suggestion at all. Neither `clippy --fix` nor
`cargo fix` touches them, with or without `--all-targets`. They are
plain code, not macro expansions, so they were fixed line-guided from
rustc's own line numbers:
- `|| unsafe { .. }` -> `|| { .. }` where objc2 0.6 made the call safe.
Dropping a block rustc has already proved redundant cannot change
behaviour.
- `use objc2_metal::{MTLComputePipelineState as _, MTLLibrary as _}` ->
just the name the function needs. The unused one is a trait brought in
as `_`; the type itself is referenced fully qualified on the lines
above, which is why it reads as used at a glance.
Checked before deleting, because this is the shape that broke #372: each
unused import was matched against every other mention of the name in its
file and against the file's six `cfg(not(target_os = "macos"))` branches.
None appears in one, and objc2-metal is a macOS-only dependency, so no
other configuration can want them.
Verified: 0 errors, 37 backend-apple tests (32 pass, 5 ignored), and
loader-gguf still builds and its fabric-meter `process_calibration`
passes.
Co-Authored-By: Claude Opus 5 <[email protected]>