match
MIR loweringI'm trying to understand them.
False edges
We don't want to have the exact structure of the decision tree be
visible through borrow checking. False edges ensure that the CFG as
seen by borrow checking doesn't encode this. False edges are added:
- From each pre-binding block to the next pre-binding block.
- From each otherwise block to the next pre-binding block.
The first case is set up here, the second here.
I couldn't find more explanation than that so I tried commenting out and looking at tests.
From looking at the tests, the overall idea is to make borrowck think that we're trying each arm in order despite the fact that we're often more clever than that. Also that any guard may of may not be run.
In each case, the error mentioned disappears when I disable false edges.
Originally added in https://github.com/rust-lang/rust/pull/45200 as "always true guards", now they do more than that.