pub fn Collect(Block: &Block, InlineComments: bool) -> Vec<Candidate>Expand description
Collect all structurally eligible let bindings in Block.
Bindings are excluded when:
- The pattern is not a plain identifier (destructuring, tuple, …).
- The binding is
let mutorlet ref. - The binding has a
@ subpat. - There is no initialiser (
let x;). - There is a diverging
elsebranch (let … = … else { … }). - The let statement carries attributes AND
InlineCommentsisfalse. - The binding is the last statement in the block (nothing to substitute into).