Module remove_drop_never

Source
Expand description

The MIR code often contains variables with type ! that come from panic!s and similar !-returning` functions.

We want to get rid of these variables since they are never initialized. The only instruction that uses them is StorageLive/StorageDead; we remove these, which may hide some UB but shouldn’t have other consequences.

The now-unused local will then be removed in remove_unused_locals.

Structs§

Transform