You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chore: triage dead-code warnings (fields, variants, constants, dead assignments) #854
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.
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).
Activity
chore: #854 — first cut at dead-code warning triage (#1058)
chore: triage dead_code-family warnings (#854) (#2320)
fix(runtime): reject unregistered box pointers in js_box_set/get (#4898…
perf(codegen): make typed-feedback site registration opt-in (3.6x on …
chore(codegen,runtime): repsel Phase 4b cleanup — delete the dead PER…
codegen: receiver-region model + equivalence lint (PerryTS#9254 phase 1)
codegen: receiver-region model + equivalence lint (#9254 phase 1) (#9257
fix(runtime): AsyncResource and AsyncHook are ordinary objects (#10926,…
fix(runtime): AsyncResource and AsyncHook are ordinary objects (#10926,…