Commit efabfe2
committed
Clarify main discriminant reads rule
The rule,
> If pattern matching requires inspecting a discriminant, the relevant
> place will get captured by `ImmBorrow`.
is unclear in two ways. For one, when does pattern matching "require
inspecting" the discriminant? Second, what is the "relevant" place?
Let's break this up into two rules (and add rule identifiers). The
first rule will state that reading the discriminant captures the place
containing the discriminant (by `ImmBorrow`). The second rule will
state explicitly the baseline rule for when such reads happen.1 parent 8150ab9 commit efabfe2
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
292 | 296 | | |
293 | 297 | | |
294 | 298 | | |
| |||
0 commit comments