Rustc's next trait solver is due in Rust 1.102.0, developer says
The next trait solver, a large subsystem of the Rust compiler (rustc) built to replace the old one, will finally land in Rust 1.102.0, according to a developer who works on it. In the last stages before stabilization, its performance was a major blocker. The post on donsz.nl writes up the author's EuroRust 2026 talk, "Optimizing Rustc's next trait solver", given on October 15, 2026. It sets out to explain, with no prior knowledge assumed, what a trait solver is and why its speed is a problem.
The author has worked on the new solver full-time for about a year, mainly on its performance. The main person driving stabilization is lcnr, who has worked on it far longer. The author's work is paid for by Hexcat and RustNL.
The history begins soon after Rust 1.0.0 shipped on May 15, 2015. The Chalk project, described on GitHub as an implementation and definition of the trait system using a "PROLOG-like logic solver", got its first commit on July 24 that year. Its initial goal seems to have been to formalize the trait system so it could be proven correct, and one reason that did not work well was that the system was not very correct. Chalk has since been "sunset in favor of the newer next-generation trait solver". That project officially started in October 2022 to turn Chalk's lessons into a compiler subsystem that could eventually replace the old solver's code. The two are not the same thing.
The aim is to have fewer correctness bugs in the trait system, and the effort is now called "project zero", after the number of soundness bugs the team would ideally like to have. One long-standing bug in the old solver has been open since May 28, 2015, 13 days after Rust 1.0. It abuses "implied bounds" to make the compiler turn a short lifetime into 'static, which allows a reference to be used after it is freed. Some such bugs were fundamentally impossible to fix given how the old solver worked.
A trait is a property of a type, such as Clone, and the trait system checks whether a given trait bound is satisfied. The author compares this to Prolog, where a program holds facts and relationships between them and the runtime answers questions about them. In Rust, impl blocks can express both. The old and new solvers do not describe themselves as Prolog-like as plainly as Chalk did, but neither is very different from how one would build a Prolog runtime. Trait solving is also separate from type inference: the two are distinct subsystems, although inference sometimes calls the solver, and the solver can help pin down type variables.
To prove a bound, the solver has several strategies. It can find a matching impl block, such as the standard library's Add for i32. It can use rules built into the compiler, as when it decides that i32 is Sized, meaning its size in memory is known. Inside a generic function, it can rely on a where bound, including the implicit Sized bound that every generic gets. Sized questions are hard mostly because of sheer volume: compiling the standard library asks them about 800,000 times. They can also be recursive. Proving that a struct is Sized means proving it for each field, and for a String field the solver has to go another layer down to Vec
Key facts
- The author says Rustc's next trait solver will land in Rust 1.102.0, and that performance was a major blocker in the last stages before stabilization.
- The project officially started in October 2022 to build on lessons from Chalk, whose first commit dates to July 24, 2015.
- The goal is fewer correctness bugs; one soundness bug in the old solver has been open since May 28, 2015, and permits use of a reference after it is freed.
- Compiling the Rust standard library asks whether a type implements Sized about 800,000 times.
- The solver proves bounds through impl blocks, rules built into the compiler, or where bounds inside generic functions.
Why it matters
The author describes the trait solver as a large compiler subsystem that the project has been trying to replace. The old one has long-standing correctness bugs, some of them impossible to fix with its design. The new solver is meant to cut that class of bug, and the "project zero" name signals the ideal: no soundness bugs in the type system. Speed was one of the last major obstacles to stabilizing it.
Who it affects
Rust programmers rely on this machinery whenever the compiler checks a trait bound, for example before allowing a call to a generic function or when finding the method behind a + b. Even ordinary local variables trigger a query, because they must be Sized to live on the stack. People who want to understand compiler internals also get an entry point that assumes no prior knowledge.
How to use it
According to the author, the new solver arrives with Rust 1.102.0; no release date for that version is given. The talk behind the post is also available to watch on YouTube. One language detail is useful today: every generic parameter gets an implicit Sized bound, which you can opt out of with T: ?Sized. The author says the syntax may change to T: MetaSized in the future and points readers to the "Sized Hierarchy" work. They also ask readers to consider sponsoring Hexcat or the RustNL maintainer team.
How solid is it
This is a first-hand account from someone who works on the solver daily, though not the main person driving its stabilization. The part of the post covered here is incomplete: it deals with history and basics and stops before explaining the causes of the performance problem or the optimizations made. It contains no speedup figures, benchmark results or compile-time measurements for the new solver.
Risks and caveats
The 800,000 figure counts Sized queries made while compiling the standard library. It is not presented as specific to the new solver, and no timing is attached to it. The post cites the 2015 lifetime bug as an example of the old solver's problems, but the portion covered here does not say the new solver fixes that particular bug. The Prolog comparison is an explanatory analogy for how trait solving works.
“In the last stages, before stabilizing it, its performance was a major blocker.”
— The author of the donsz.nl post, on the next trait solver