Commit 948af82
blockifier: remove stale allow(dead_code) (#14398)
Removes a stale `#[allow(dead_code)]` from the free function
`get_compiled_class_hash_v2` in `blockifier::state::utils`. The function is
NOT dead — only the annotation is removed; no behavior changes.
Why it's stale:
- The function is `pub` and lives in a fully public module path
(`pub mod state` in lib.rs -> `pub mod utils` in state.rs), so it is part
of blockifier's public API. The `dead_code` lint never fires on items
reachable from the crate root via public visibility, so the annotation
suppresses nothing.
- It is, in fact, actively used: `blockifier_reexecution` imports it as
`default_get_compiled_class_hash_v2` and calls it from both
`rpc_state_reader.rs` and `offline_state_reader.rs`
(`StateReader::get_compiled_class_hash_v2` default-impl plumbing), and
`starknet_transaction_prover` calls it from `running/classes_provider.rs`.
Verification (RUSTC_WRAPPER unset, CARGO_INCREMENTAL=0):
- `scripts/rust_fmt.sh` — clean
- `cargo build -p blockifier` — zero dead_code/unused warnings (default cfg)
- `cargo clippy -p blockifier --all-targets` — clean; this compiles the
lib, test and bench targets, so it also confirms the `--tests` cfg builds
with zero dead_code warnings.
This is a pure lint-attribute removal (no codegen/runtime effect), so the
two clean builds above are the load-bearing proof.
Environmental note: `cargo check -p blockifier --features cairo_native`
could not run in this sandbox — the `tblgen v0.5.2` build dependency (an
LLVM/MLIR TableGen binding pulled in by `cairo_native`) fails its build
script because the full LLVM-19 tooling is unavailable here. This failure
happens before blockifier is compiled, is unrelated to removing a lint
attribute, and reproduces identically on `main`. The cairo_native-gated
match arm is unaffected by this change.
Co-authored-by: Claude <noreply@anthropic.com>1 parent a215c31 commit 948af82
1 file changed
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
0 commit comments