After the interpreter removal (#420), several #[allow(dead_code)] annotations remain in src/simlin-engine/src/. Some are correct (fields set by production struct literals but only read in tests), but others may be masking genuinely dead code that should be deleted or gated with #[cfg(test)].
A cleanup pass should:
grep -rn '#\[allow(dead_code)\]' src/simlin-engine/src/ to enumerate all annotations
- For each, determine whether the item is:
- Production code that clippy can't trace (e.g. salsa dispatch, struct fields set via literals) -- keep
#[allow(dead_code)] with a comment explaining why
- Test-only code -- change to
#[cfg(test)] so it's excluded from the production binary
- Genuinely dead -- delete it
- Remove any
#[allow(dead_code)] that was added defensively during the interpreter removal without verifying the item's actual usage
Known items from #420 review:
compiler/mod.rs: Module struct fields runlist_initials, runlist_order, module_refs -- set by production code but only read in tests
compiler/expr.rs: SubscriptIndex::strip_loc(), Expr::strip_loc()
ast/expr2.rs: IndexExpr2::get_var_loc(), Expr2::get_var_loc() -- called via salsa dispatch
ast/mod.rs: Ast<Expr2>::get_var_loc() -- called via salsa dispatch
ast/array_view.rs: ArrayView::is_contiguous()
After the interpreter removal (#420), several
#[allow(dead_code)]annotations remain insrc/simlin-engine/src/. Some are correct (fields set by production struct literals but only read in tests), but others may be masking genuinely dead code that should be deleted or gated with#[cfg(test)].A cleanup pass should:
grep -rn '#\[allow(dead_code)\]' src/simlin-engine/src/to enumerate all annotations#[allow(dead_code)]with a comment explaining why#[cfg(test)]so it's excluded from the production binary#[allow(dead_code)]that was added defensively during the interpreter removal without verifying the item's actual usageKnown items from #420 review:
compiler/mod.rs:Modulestruct fieldsrunlist_initials,runlist_order,module_refs-- set by production code but only read in testscompiler/expr.rs:SubscriptIndex::strip_loc(),Expr::strip_loc()ast/expr2.rs:IndexExpr2::get_var_loc(),Expr2::get_var_loc()-- called via salsa dispatchast/mod.rs:Ast<Expr2>::get_var_loc()-- called via salsa dispatchast/array_view.rs:ArrayView::is_contiguous()