rustc_mir_transform

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§

  • A visitor that determines locals in a MIR body that can be const propagated
  • Visits MIR nodes, performs const propagation and runs lint checks as it goes

Enums§

  • The mode that ConstProp is allowed to run in for a given Local.
  • Value 🔒

Constants§

  • 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.