304. L0525 peek_then_pop matches List.last and List.pop by name (2026-11-22)
- Decision.
let x = s.last!followed bys.pop()warns, with a fix tolet x = s.pop()!, only when the checker typessasList(fact table) andsis a plain name or field path.lint_std_namesgoes from 133 to 135 for the literalslastandpop. - Why. Both are core
Listbuiltins (crates/cpl-check/src/builtins.rs), not std API, and the type gate keeps a user type with its ownlast/popout. Six corpus ports have the C++.back(); .pop_back()shape.DequeandHeap(std types) are left out until the linter reads their methods from the checker rather than by name. - Reverse. Delete
crates/cpl-lint/src/rules/pops.rsandspec/lints/peek_then_pop/, and lower the ratchet.