Commit 7f78620
committed
Coercion support: &[T;N] → &[T] unsize coercion builds length-N slice model
Add PointerCoercion::Unsize arm in rvalue_type(): reads N from the MIR
source type before consuming the operand, then wraps the array place type
in a (Array<Int,T>, N) tuple to produce the slice model with concrete length.
Paired tests: pass accesses index 3 on a 4-element slice (safe), fail
accesses index 4 → Unsat.
https://claude.ai/code/session_01BV92ggaKvAp7oNknvVmGsM1 parent 037f292 commit 7f78620
3 files changed
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
659 | 659 | | |
660 | 660 | | |
661 | 661 | | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
662 | 683 | | |
663 | 684 | | |
664 | 685 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments