Example:
for (let mut j = 0; j < 10; j += 1) {
let rec foo = () => {
print("never executed")
foo()
}
void
}
foo is never called but the code to allocate the closure and the actual webassembly function are generated. The optimize_dead_assignments optimization doesn't consider that foo is recursive and counts the usage of foo inside the body of foo as a use.