-
Notifications
You must be signed in to change notification settings - Fork 19
engine: audit and clean up #[allow(dead_code)] annotations #424
Copy link
Copy link
Open
Description
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
- Production code that clippy can't trace (e.g. salsa dispatch, struct fields set via literals) -- keep
- 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: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()
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels