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.