Roughly 60 dead_code-family warnings remain after the warning-cleanup PR. Each one needs case-by-case judgment between #[allow(dead_code)] (with a one-line comment explaining why) and deletion.
Categories
- Fields never read — e.g.
url, stage, id, algo, description, cancelled, expires_in_secs, estimated_wait_secs, inferred, is_dylib, job_id, module_name, name, new_name, watchos, build.
- Variants never constructed —
DynamicPropertyAccess, UnsupportedSyntax, Low.
- Constants never used —
POINTER_TAG, STRING_TAG, POINTER_MASK, SHORT_STRING_TAG, TAG_MARKER, TRANSITION_CACHE_MASK.
- Statics/functions never used —
CALLBACK_COUNTER, with_base_dir.
- Dead assignments —
value assigned to X is never read and variable X is assigned to, but never used: dep_issues_count, extract_ok, host, hostname, modifiers, n, pathname, removed_count, result_len, user_func_idx.
- Unused variables —
ty, promise_resolve.
Why per-site review
Some of these are intentional:
- NaN-boxing tag constants (
POINTER_TAG, STRING_TAG, POINTER_MASK, SHORT_STRING_TAG, TAG_MARKER) are part of the value-encoding contract documented in CLAUDE.md. They may be referenced from documentation, external tooling, or codegen even if rustc doesn't see a direct use.
- Struct fields can be intentional for binary layout, FFI ABI, or future-feature placeholders.
- Dead assignments may be a missing read (real bug) or a refactor leftover (safe to remove).
Others are genuine cruft that should just be deleted.
How to approach
For each warning:
- If the symbol is part of an externally-meaningful contract →
#[allow(dead_code)] with a one-line comment explaining why (e.g. // part of the NaN-boxing tag contract, see CLAUDE.md).
- If the symbol is leftover from a removed feature → delete it.
- If the warning is a dead assignment, check whether the missing read is a bug or whether the assignment itself is dead.
Site list
Captured from:
cargo build --release 2>&1 | grep -B0 -A1 "is never\|never constructed\|assigned to, but never used\|value assigned to.*never read"
Context
Carved out of the warning-cleanup PR (chore: reduce compile warnings 325 → 125).
Roughly 60
dead_code-family warnings remain after the warning-cleanup PR. Each one needs case-by-case judgment between#[allow(dead_code)](with a one-line comment explaining why) and deletion.Categories
url,stage,id,algo,description,cancelled,expires_in_secs,estimated_wait_secs,inferred,is_dylib,job_id,module_name,name,new_name,watchos,build.DynamicPropertyAccess,UnsupportedSyntax,Low.POINTER_TAG,STRING_TAG,POINTER_MASK,SHORT_STRING_TAG,TAG_MARKER,TRANSITION_CACHE_MASK.CALLBACK_COUNTER,with_base_dir.value assigned to X is never readandvariable X is assigned to, but never used:dep_issues_count,extract_ok,host,hostname,modifiers,n,pathname,removed_count,result_len,user_func_idx.ty,promise_resolve.Why per-site review
Some of these are intentional:
POINTER_TAG,STRING_TAG,POINTER_MASK,SHORT_STRING_TAG,TAG_MARKER) are part of the value-encoding contract documented inCLAUDE.md. They may be referenced from documentation, external tooling, or codegen even if rustc doesn't see a direct use.Others are genuine cruft that should just be deleted.
How to approach
For each warning:
#[allow(dead_code)]with a one-line comment explaining why (e.g.// part of the NaN-boxing tag contract, see CLAUDE.md).Site list
Captured from:
Context
Carved out of the warning-cleanup PR (
chore: reduce compile warnings 325 → 125).