mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
![]() new solver: prefer trivial builtin impls As discussed [on zulip](https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/needs_help.3A.20trivial.20builtin.20impls), this PR: - adds a new `BuiltinImplSource::Trivial` source, and marks the `Sized` 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 sibling `regions/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 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
messages.ftl |