Commit 29e6dc6
The parser attaches a default modifier to every `and`/`or`/`unless`, whose
`matching` is `None`. `walk_binary` mapped that to `VectorMatch{On, []}` —
byte-identical to an explicit `on()`. So `a and b` and `a and on() b` lowered
to the same tree, and the default "match on all shared labels" was
misrepresented as "match on the empty label set".
The default is exactly `ignoring([])` (ignore no labels ⇒ match on all shared
labels). Map the `None` arm to `Ignoring([])` instead:
- `a and b` → Ignoring([])
- `a and on() b` → On([]) (now distinct)
- `a and ignoring() b` → Ignoring([]) (now correctly equal to default)
Added `set_op_default_match_is_ignoring_empty_not_on_empty` (distinct-vs-on,
equal-to-ignoring). Full workspace suite green; clippy --all-targets clean.
Co-authored-by: zz_y <zz_y@node0.zz-y-308294.softmeasure-pg0.clemson.cloudlab.us>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d38831d commit 29e6dc6
2 files changed
Lines changed: 22 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
391 | | - | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
392 | 399 | | |
393 | 400 | | |
394 | 401 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
144 | 158 | | |
145 | 159 | | |
146 | 160 | | |
| |||
0 commit comments