Commit f2deaf0
build(rust): pin toolchain to 1.96.0 + fix the two 1.96-only clippy lints (#87)
## What & why
Root-causes the recurring **Build Check** skew rather than just papering
over it again.
CI installs floating `stable` (currently **1.96**) via
`dtolnay/rust-toolchain@stable`. Local dev had drifted to an older
`stable` (**1.94**) whose clippy couldn't see two `collapsible_match`
lints that 1.96 flags — so #85's clippy pass (run on 1.94) still left
`main` red on Build Check. This is the second time a local/CI clippy
version gap has bitten the lint gate.
## Changes
- **`rust-toolchain.toml`** — pins `channel = "1.96.0"` (+ `clippy`,
`rustfmt`) so `cargo` uses the **same** toolchain locally and in CI. No
more silent skew; the toolchain is now bumped *deliberately* (edit the
file + re-run lints) instead of drifting under the gate.
- **Two `collapsible_match` fixes** (via `clippy --fix` → match guards,
behaviour-preserving):
- `src/lsp/handlers/definition.rs` — `TypeDef` goto-definition arm
- `src/vm/optimizer.rs` — `JumpIfFalse`/`JumpIfTrue` nop-removal arm
## Verification (with the pinned 1.96.0)
| gate | result |
|------|--------|
| `cargo clippy -- -D warnings` | ✅ exit 0 |
| `cargo fmt --check` | ✅ clean |
| `cargo test --lib` | ✅ 173/173 |
Installed `1.96.0` locally to verify against the exact toolchain CI uses
— my previous 1.94 was blind to these lints.
## Note on CI honoring the pin
CI's `dtolnay/rust-toolchain@stable` currently resolves to `1.96.0`, so
Build Check is green either way today. `rustup` honors
`rust-toolchain.toml` for `cargo` invocations, so the pin takes effect
for local dev immediately. If a future `stable` bump should *not*
override the pin in CI, the Build Check / e2e workflows can be switched
from `@stable` to the pinned version — happy to do that as a follow-up
if wanted (kept out of here to avoid touching SHA-pinned CI actions in a
lint fix).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_013wg3Mtq2QFhYi4XVw1Z6z7
---
_Generated by [Claude
Code](https://claude.ai/code/session_013wg3Mtq2QFhYi4XVw1Z6z7)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 2204e1d commit f2deaf0
3 files changed
Lines changed: 25 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
74 | 72 | | |
75 | 73 | | |
76 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| |||
0 commit comments