Commit 1eff192
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 16c7d9e commit 1eff192
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