Skip to content

Commit efb28a4

Browse files
authored
Merge pull request #277 from cipherstash/v3-deny-dead-code
chore: make dead code a compile error + drop dead index_types module
2 parents 5c0ab3d + 44a9927 commit efb28a4

7 files changed

Lines changed: 18 additions & 23 deletions

File tree

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,9 @@ members = [
2323
"tests/sqlx",
2424
]
2525
default-members = ["tests/sqlx"]
26+
27+
# Dead code is a hard error. Note: rustc exempts unused `pub` items in a lib, so
28+
# don't `pub` a test-support item unless an integration test consumes it.
29+
[workspace.lints.rust]
30+
dead_code = "deny"
31+
unused_imports = "deny"

crates/eql-codegen/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ path = "src/main.rs"
1717
[lib]
1818
name = "eql_codegen"
1919
path = "src/lib.rs"
20+
21+
[lints]
22+
workspace = true

crates/eql-scalars/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ description = "Scalar/term catalog for EQL encrypted-domain codegen (std-only, n
88
# generator (eql-codegen) compiles in ~1-2s and never drags serde/toml onto the
99
# SQL build's critical path. Do not add deps here.
1010
[dependencies]
11+
12+
[lints]
13+
workspace = true

crates/eql-tests-macros/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ syn = { version = "2", features = ["full"] }
1212
quote = "1"
1313
proc-macro2 = "1"
1414
eql-scalars = { path = "../eql-scalars" }
15+
16+
[lints]
17+
workspace = true

tests/sqlx/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ eql-tests-macros = { path = "../../crates/eql-tests-macros" }
2323
[dev-dependencies]
2424
# None needed - tests live in this crate
2525

26+
[lints]
27+
workspace = true
28+
2629
[features]
2730
default = []
2831
# Opt-in to slow benchmark / regression / scale tests. Without this feature

tests/sqlx/src/index_types.rs

Lines changed: 0 additions & 21 deletions
This file was deleted.

tests/sqlx/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use sqlx::PgPool;
77
pub mod assertions;
88
pub mod fixtures;
99
pub mod helpers;
10-
pub mod index_types;
1110
pub mod matrix;
1211
pub mod scalar_domains;
1312
#[macro_use]
@@ -37,7 +36,6 @@ pub use helpers::{
3736
read_pg_stat_statements, reset_pg_stat_statements, ExplainStats, PgStatEntry,
3837
PLACEHOLDER_PAYLOAD,
3938
};
40-
pub use index_types as IndexTypes;
4139
pub use scalar_domains::{
4240
assert_null, assert_raises, assert_scalar_plaintexts, blocker_msg, commute_op,
4341
fetch_fixture_payload, sql_string_literal, ScalarDomainSpec, ScalarType, Variant,

0 commit comments

Comments
 (0)