Module known_panics_lint

Source
Expand description

A lint that checks for known panics like overflows, division by zero, out-of-bound access etc. Uses const propagation to determine the values of operands during checks.

Structsยง

CanConstProp ๐Ÿ”’
A visitor that determines locals in a MIR body that can be const propagated
ConstPropagator ๐Ÿ”’
Visits MIR nodes, performs const propagation and runs lint checks as it goes
KnownPanicsLint ๐Ÿ”’

Enumsยง

ConstPropMode ๐Ÿ”’
The mode that ConstProp is allowed to run in for a given Local.
Value ๐Ÿ”’

Constantsยง

MAX_ALLOC_LIMIT ๐Ÿ”’
The maximum number of bytes that weโ€™ll allocate space for a local or the return value. Needed for #66397, because otherwise we eval into large places and that can cause OOM or just Severely regress performance.