Repository navigation
lints: Google's Rust style guide as R30–R42; 18 zero-hit lints deny; small-hit lints fixed - #910
Merged
Merged
Conversation
…42; fix the small-hit lints outside the mac crates Google published its Rust style guide on 2026-10-21. docs/rust-quality.md §9 maps each rule that is not codebase-tagged onto ours as R30–R42. Where a rule conflicts with ours, ours stays: exhaustive enums, unwrap in tests and gates, the glob import inside a target_feature body, and poison recovery in the pool. 18 clippy lints are now deny at 0 hits. The small-hit lints are fixed outside metal, hf, model-hf, serve, jinja, tokenizer and embed: redundant_clone, string_add → push_str, needless_for_each, default_trait_access, manual_let_else, implicit_clone, and others. The duplicate_mod load of ubatch_rule.rs is gone, so the lint ratchet drops from 3 to 0. Seven lints still hit the mac crates (61 spans). They stay off the table until those crates are clear. Proof: just lint, fmt and check are green. narrow-scan: the four PTX scans are identical. remote-static is green. Cargo.lock is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s in force The review on #899: the string_add rewrite had copied one 4-line block into 37 sites. Each is one format! expression again (tests and load-time code; R39 keeps push_str for kernels and steps). place.rs builds the wanted name once per stem. docs/rust-quality.md §9 drops the round's history and states the adoption rule. body.rs drops a comment that was false after the move. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
There was a problem hiding this comment.
Verdict: CLEAN: the new commit fixes both earlier must-fix items and both ⚠ items, and adds no new defect.
Since the last review:
- Must-fix 1 (
format!idiom copied about 35 times): fixed. No{ let mut out …; out.push('\n'); out }block is left incrates/. The sites now useformat!("{}\n", lines.join("\n")).place.rsbuildswantonce per stem (place.rs:867). - Must-fix 2 (false §9 text): fixed. The "Instrument for the counts" paragraph is gone. The rule is now "a lint is adopted as deny only at 0 spans". R39 limits
push_strto a kernel or a step. - ⚠
duplicate_mod: answered. The PR body says the three seat modules each carry#[allow(clippy::duplicate_mod)], so the ratchet moves 3 → 0. - ⚠ stale comment at
body.rs: fixed. The comment is deleted andlet mut scan = run;stays (body.rs:1879).runis not read after it.
Checked
- Duplicates: no new function, type or constant. dryer's 8 pairs are the
checkhelper in the refset tests, which this commit does not touch. - Complexity: crapper flagged
Place38::machine,header_typed,prompt_clausesandmarkov-accept::run. The new commit touches none of them. - Silent failure: 6 rewritten sites followed. Each builds the same string as before.
mt.rseprintof the joined text plus\nis noweprintln, with the same bytes.lookup_mainstill ends withdef add_12(a, b):\n. - Tests: no assertion changed meaning; none added or removed.
- Gates: 18 lints go to
denyat 0 spans; none relaxed. No band or tolerance moved. - Performance: host and test code only.
place.rssaves oneStringallocation per tensor per stem. - Escape catalog: no pattern matched.
Notes
- The PR body has no
nvidia-smiline and no gate output, sogpu.jsonevidence is false. The body says the change is host-only. - I could not run clippy. "0 hits" rests on the body's
just lintclaim, measured onbae1c2715.
Card check: needs-gpu. This pull request changes crates/gpu-deepseek41/src/body/snap.rs, crates/gpu-deepseek41/src/chain/attn.rs, crates/gpu-deepseek41/src/chain/attn/batch.rs … and carries no gate run on a card (CONTRIBUTING's evidence list); a maintainer adds gpu-verified after one.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #899 (same change, rebased on main, plus the review fixes). Google published its Rust style guide on 2026-10-21.
docs/rust-quality.md§9 maps each rule that is not codebase-tagged onto ours as R30–R42. Where a guide rule conflicts with ours, ours stays: exhaustive in-tree enums, unwrap in tests and gates (R10),std::archglobs inside a#[target_feature]body, and poison recovery in the worker pool.denyat 0 hits.+outside a kernel becomes oneformat!expression (37 sites, the lints: Google's Rust style guide as R30–R42; 18 zero-hit lints deny; small-hit lints fixed #899 review). R39 keepspush_strfor kernels and steps.ubatch_rule.rsis included by three seat modules; each carries#[allow(clippy::duplicate_mod)], sotools/lint-ratchet.txtgoes from 3 to 0.Proof: on bae1c27,
just linton the box is rc 0 with 0^warning:;just remote-static origin/mainis green (708 s). Host-only change (narrow-scan identical before the review fixes, which touch host code and tests only). The fixture-tier union batch of main + this + #907 ran 269 items; its 8 reds were a stale qwen38 fixture budget, now re-recorded and green.🤖 Generated with Claude Code