Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions quest/m2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The fork's feature quests folded into the [exporter](/quest/m1/ffi-export/README
## Required

- [A tuple's parts read after their variables change](/quest/m2/ts-swap-parts.md) - `(a, b) = (b, a)` swaps instead of copying one into both
- [Byte-slice locals that crash the translator](/quest/m2/ts-scalar-ice.md) - `take_apart` never reaches the arm `find_scalars` promised it wouldn't
- [Fixture cases by name](/quest/m2/ts-harness-names.md) - adding a harness case never renumbers another
- [Byte slices without objects](/quest/m2/ts-byte-views/README.md) - reading through a translated cursor allocates no object per read
- [Drop in the TypeScript translator](/quest/m2/ts-drop.md) - every value that drops in moq-net and kio drops where Rust drops it
Expand Down
21 changes: 21 additions & 0 deletions quest/m2/ts-scalar-ice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# [S] Byte-slice locals that crash the translator

## Goal

rust2-ts never panics in `Fx::take_apart` (`ts/src/lower/mir/scalar.rs`): every value
`find_scalars` holds as parts can be taken apart, or `find_scalars` declines it, proven by a
fixture that crashed before the fix and by differential tests against native Rust.

## Plan

Decided with the maintainer on 2026-10-27: a rustc ICE report that
[#130](https://github.com/kixelated/rust2/pull/130) committed by accident records
`take_apart` reaching `unreachable!("checked by find_scalars")`. The input is lost, and
`main` still has the arm (`Shape::Enum`), so reproduce it first: likely an enum-shaped value
taken apart where `find_scalars` assumed none, from the codec, moq's model census, or a
fixture variant.

- Fix it where `find_scalars` and `take_apart` disagree, and check the file's other
`checked by find_scalars` assumptions for the same gap.

Public API: none, unless the fix changes the translator's output.