Enabling the next iteration of the borrow checker on nightly

126 points by kmaasrud 4 days ago on lobsters | 6 comments

lonjil | 3 days ago

Oh hell to the yeah, it's finally happening. I hear the next gen trait solving doodad is coming soon too.

gignico | 3 days ago

What will the new trait solving do?

lonjil | 3 days ago

The current trait solver isn't fully sound. It's possible to get UB in safe Rust by doing weird type mumbo jumbo. Most of the known cases have band aid fixes in the compiler, but the new trait solver simply won't have those unsoundness issues at all.

The new solver should also be able to handle some complex trait soup situations better.

It's supposed to be faster, so faster compile times hooray.

Finally, the design is much cleaner. The code is better and easier to understand. The old trait solver was a mess, from what I hear. So the new one should be easier to maintain.

gignico | 3 days ago

I see, thanks!

addison | 3 days ago

Can confirm faster compiles. I have one project that takes several hours and tens of GiB of RAM in old solver, and a couple minutes and a few hundred MiB in next solver. Actually cracked.

addison | 3 days ago

This gives me great joy. The exact flow-based solving stuff they describe has irked me for years, though I worry I have become used to the workarounds...