Two generated-Rust compile failures on --target native (host). Both are pre-existing on main; found while building repros for #663.
1. E0308 — writing a number into an array that lowered to Vec<Value>
let E: i32[] = []
let keep = null
let i: i32 = 0
while (i < 4) { E.push(i); i = i + 1 }
fn stash(arr) { keep = arr }
fn main() {
stash(E)
E[1] = 77
console.log(keep[1])
}
main()
error[E0308]: mismatched types
--> src/main.rs:319:86
319 | { let __i = (1_f64) as usize; let __v = 77_f64; (*E.borrow_mut())[__i] = __v; };
| ---------------------- ^^^ expected `Value`, found `f64`
The array is boxed to Vec<Value> (it escapes via stash) but the element write still emits the f64 form. The two halves disagree about the representation.
2. E0382 — module-scope loop counter reported as moved
let C: i32[] = []
let D: i32[] = []
let E: i32[] = []
let F: i32[] = []
let keep = null
let i: i32 = 0
while (i < 4) { C.push(i); D.push(i); E.push(i); F.push(i); i = i + 1 }
fn stash(arr) { keep = arr }
fn main() { stash(E) }
main()
error[E0382]: use of moved value: `i`
Giving each fill loop its own counter avoids it, which is why this is easy to miss.
Impact
Both are hard compile errors — the program does not build — so they are loud rather than silent, unlike #668. But they reject valid tish, and the shapes are ordinary.
Two generated-Rust compile failures on
--target native(host). Both are pre-existing onmain; found while building repros for #663.1.
E0308— writing a number into an array that lowered toVec<Value>The array is boxed to
Vec<Value>(it escapes viastash) but the element write still emits thef64form. The two halves disagree about the representation.2.
E0382— module-scope loop counter reported as movedGiving each fill loop its own counter avoids it, which is why this is easy to miss.
Impact
Both are hard compile errors — the program does not build — so they are loud rather than silent, unlike #668. But they reject valid tish, and the shapes are ordinary.