The nightly survey (2026-04-12) identified several pieces of dead code in the PL IR and related modules. These are structural enough that they may warrant maintainer review before removal.
1. fold_func_param is never called
fold.rs:289 exports fold_func_param but it has zero callers. The default fold_func implementation uses struct spread and only folds body and args, skipping FuncParam::default_value and Func::env. This means all PlFold implementors miss expressions within default parameter values and captured environments.
This could be a latent correctness issue if any fold pass needs to visit those fields, or it could be intentional if those fields are always resolved before folding occurs.
2. Lineage::prev_columns is write-only
lineage.rs:21 defines prev_columns which is populated by Lineage::clear() but never read anywhere. The comment says it is "A hack that allows name retention when applying ExprKind::All { except }", but no code reads it. It is also #[serde(skip)].
3. display_ids parameter is always false
lineage.rs:74 display_lineage accepts display_ids: bool but the only call site always passes false, making the true branch unreachable. Appears to be an unfinished debugging aid.
The nightly survey (2026-04-12) identified several pieces of dead code in the PL IR and related modules. These are structural enough that they may warrant maintainer review before removal.
1.
fold_func_paramis never calledfold.rs:289exportsfold_func_parambut it has zero callers. The defaultfold_funcimplementation uses struct spread and only foldsbodyandargs, skippingFuncParam::default_valueandFunc::env. This means allPlFoldimplementors miss expressions within default parameter values and captured environments.This could be a latent correctness issue if any fold pass needs to visit those fields, or it could be intentional if those fields are always resolved before folding occurs.
2.
Lineage::prev_columnsis write-onlylineage.rs:21definesprev_columnswhich is populated byLineage::clear()but never read anywhere. The comment says it is "A hack that allows name retention when applyingExprKind::All { except }", but no code reads it. It is also#[serde(skip)].3.
display_idsparameter is alwaysfalselineage.rs:74display_lineageacceptsdisplay_ids: boolbut the only call site always passesfalse, making thetruebranch unreachable. Appears to be an unfinished debugging aid.