new solver: prefer trivial builtin impls by lqd · Pull Request #135639 · rust-lang/rust (original) (raw)
As discussed on zulip, this PR:
- adds a new
BuiltinImplSource::Trivial
source, and marks theSized
builtin impls as trivial - prefers these trivial builtin impls in
merge_trait_candidates
The comments can likely be wordsmithed a bit better, and I stole was inspired by the old solver ones. Let me know how you want them improved.
When enabling the new solver for tests, 3 UI tests now pass:
regions/issue-26448-1.rs
and its siblingregions/issue-26448-2.rs
were rejected by the new solver but accepted by the old one- and
issues/issue-42796.rs
where the old solver emitted some overflow errors in addition to the expected error
(For some reason one of these tests is run-pass, but I can take care of that another day)
r? lcnr