Skip to content

Plan, apply and roll back changes to a production ontology, with a blast radius report and a proof an auditor can re-check.

fix(clippy): allow unknown_lints beside the chunks_exact silencing

Fabio Rovaida26c4001fdf
diff --git a/src/vecstore.rs b/src/vecstore.rs
index b1501dad..b86e1c66 100644
--- a/src/vecstore.rs
+++ b/src/vecstore.rs
@@ -968,6 +968,13 @@ fn f32_slice_to_bytes(v: &[f32]) -> Vec<u8> {
// identically — it drops the same trailing remainder — so keep it and silence
// the lint rather than raise the effective compiler requirement for every
// embeddings build.
+// `unknown_lints` alongside it, because the silencing is only inert while the
+// lint exists. clippy 0.1.96 as shipped by Homebrew no longer knows this name,
+// and `unknown_lints` is warn-by-default, so the allow that was added to keep
+// the build quiet became the only thing making noise. CI runs the all-features
+// leg as `clippy --all-targets -- -D warnings`, which would promote that
+// warning to an error and fail a leg over an attribute that does nothing.
+#[allow(unknown_lints)]
#[allow(clippy::chunks_exact_to_as_chunks)]
fn bytes_to_f32_vec(b: &[u8]) -> Vec<f32> {
b.chunks_exact(4)
diff --git a/tests/turbovec_index_test.rs b/tests/turbovec_index_test.rs
index 0cb1696c..4fb7dfe2 100644
--- a/tests/turbovec_index_test.rs
+++ b/tests/turbovec_index_test.rs
@@ -528,6 +528,9 @@ fn measure_recall_on_a_real_corpus() {
let cache_path = labels_path.with_extension(format!("{n}.f32"));
// Same 1.85-MSRV reasoning as vecstore::bytes_to_f32_vec: clippy suggests
// as_chunks, stabilized only in Rust 1.88; chunks_exact is stable since 1.31.
+ // `unknown_lints` too: a clippy that has dropped the name warns about the
+ // allow itself, and CI lints this leg with `-D warnings`.
+ #[allow(unknown_lints)]
#[allow(clippy::chunks_exact_to_as_chunks)]
let flat: Vec<f32> = if cache_path.exists() {
let raw = std::fs::read(&cache_path).unwrap();