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.
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.