about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/example/subslice-patterns-const-eval.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-01-18 09:11:06 +0100
committerGitHub <noreply@github.com>2025-01-18 09:11:06 +0100
commit862a17cd17fb2a56211ab32082bf918dc53e75a7 (patch)
treea5b62c7e6e92b3a5ac5816988483564ca546f205 /compiler/rustc_codegen_gcc/example/subslice-patterns-const-eval.rs
parent80fcf159c92ee9c3ee906d230d2e1aae9086cbba (diff)
parent00844be421ff67872681cf9c4d1a4cb8d4e90891 (diff)
downloadrust-862a17cd17fb2a56211ab32082bf918dc53e75a7.tar.gz
rust-862a17cd17fb2a56211ab32082bf918dc53e75a7.zip
Rollup merge of #135639 - lqd:trivial-builtin-impls, r=lcnr
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
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/subslice-patterns-const-eval.rs')
0 files changed, 0 insertions, 0 deletions