Closed saethlin closed 2 years ago
Looks like this code simply wants compare_exchange
without the "weak", if it does not want to handle spurious failures?
Nah, that’s just a bug, it should have Err(INCOMPLETE) => (), branch
@RalfJung in case no-one has told you this yet, miri is very cool, thanks!
compare_exchange_weak
is allowed to spuriously fail. By default, Miri makes most calls fail so this panics when running tests: https://github.com/matklad/once_cell/blob/2cdfc1e0a92c8e51534cd91c49f41478a61a5ab6/src/imp_pl.rs#L171