fable-compiler / Fable

F# to JavaScript, TypeScript, Python, Rust and Dart Compiler
http://fable.io/
MIT License
2.93k stars 301 forks source link

[Rust] Fixed PhysicalHash tests #3905

Closed ncave closed 1 month ago

ncave commented 1 month ago

When compiling the Rust tests in --release mode, sequentially allocated temporary objects that are immediately released can get allocated at the same address. This breaks referential equality (and PhysicalHash) expectations, so delaying their de-allocation by increasing their lifetime (by binding them to variables) makes the tests work.