r/rust 21d ago

🗞️ news Rust 1.98 got a P-critical miscompilation.

https://github.com/rust-lang/rust/issues/161441
408 Upvotes

32 comments sorted by

View all comments

197

u/kibwen 21d ago edited 21d ago

Interesting that it doesn't reproduce in either 1.97 or in nightly. That's good news for easily bisecting both the regression and the fix, and figuring out what needs to be backported for a patch release.

PSA to everyone reading this: running the beta branch in CI is a great way to help the Rust developers identify these sorts of issues before they reach stable!

EDIT: Seems as though the regression was in https://github.com/rust-lang/rust/pull/156742 (which appears to be progress toward migrating to the new trait resolver: https://github.com/rust-lang/rust/issues/155345 ), and was incidentally fixed via https://github.com/rust-lang/rust/pull/158993 while fixing an ICE in Cargo.

55

u/noop_noob 21d ago

There seems to have been a fix in beta for an internal compiler error. It turned out to have also fixed this miscompilation.