Commit 60b5e5a
committed
Remove consP HACK rule and removeIndexTail from RawPtr aggregate
The consP rule that merged ConstantIndex with PointerOffset was
a workaround for a deeper issue: removeIndexTail in
#mkAggregate(aggregateKindRawPtr) strips the element-extraction
CI(0) when constructing fat pointers from thin pointers, but
#typeProjection later adds per-element navigation projections
(Field for MaybeUninit→ManuallyDrop→T) that assume the element
has already been extracted.
Removing removeIndexTail preserves the CI(0) through the fat
pointer construction, allowing the subsequent #typeProjection
projections to correctly navigate into individual array elements.
The consP HACK rule is also removed as it is no longer needed
and was conceptually unsound (merging projections from different
semantic levels).
The iterator-simple test now reaches a different stuck state:
PointerOffset(1,0) applied to a scalar Integer after successful
element navigation, which is closer to the real remaining issue
(projection ordering between CI and PointerOffset).
See #1011.1 parent 79bd202 commit 60b5e5a
2 files changed
Lines changed: 3 additions & 6 deletions
File tree
- kmir/src
- kmir/kdist/mir-semantics/rt
- tests/integration/data/prove-rs/show
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | 387 | | |
391 | 388 | | |
392 | 389 | | |
| |||
1113 | 1110 | | |
1114 | 1111 | | |
1115 | 1112 | | |
1116 | | - | |
| 1113 | + | |
1117 | 1114 | | |
1118 | 1115 | | |
1119 | 1116 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
0 commit comments