Commit 44a9927
committed
chore: make dead code a compile error (workspace [lints]) + drop dead index_types
Adds a [workspace.lints] table denying dead_code and unused_imports, with each
member crate opting in via [lints] workspace = true. Dead code is now a hard
`cargo build`/`cargo test` error, not just a clippy -D warnings CI warning, so
an unused fn/field/variant/import cannot rot silently.
Also removes tests/sqlx/src/index_types.rs (and its lib.rs mod + IndexTypes
re-export). The module was a typo-prevention constants scaffold added with the
SQLx test migration (2025-10-27, 47d1c21) but never adopted — all six constants
had zero references since creation. It is the kind of dead code the new lint is
meant to stop, but rustc's dead_code lint exempts unused *pub* items in a lib
crate (it assumes a sibling/downstream crate may use them), and eql_tests is a
lib consumed by its integration tests, so the pub module slipped through. Removed
by hand; the lint guards the private-dead-code case going forward.
Verified: full workspace + every integration test target compiles clean under
the new deny policy; eql-scalars/eql-codegen/eql-tests-macros test suites green.1 parent 46ace0b commit 44a9927
7 files changed
Lines changed: 18 additions & 23 deletions
File tree
- crates
- eql-codegen
- eql-scalars
- eql-tests-macros
- tests/sqlx
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
40 | | - | |
41 | 39 | | |
42 | 40 | | |
43 | 41 | | |
| |||
0 commit comments