about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-02-13 22:51:57 +0100
committerGitHub <noreply@github.com>2024-02-13 22:51:57 +0100
commitab1fa19d08262ab495044853050841161e2438f6 (patch)
tree25c0efe460b7614f239552c86d4f279376f8d44d /compiler/rustc_codegen_llvm/src
parente499e99a42afeb8117182d52105c3d3db42fca06 (diff)
parentb4eee2e8b3bad92465959679901fd5ecb4ada743 (diff)
downloadrust-ab1fa19d08262ab495044853050841161e2438f6.tar.gz
rust-ab1fa19d08262ab495044853050841161e2438f6.zip
Rollup merge of #121047 - compiler-errors:default-impls, r=lcnr
Do not assemble candidates for default impls

There is no reason (as far as I can tell?) that we should assemble an impl candidate for a default impl. This candidate itself does not prove that the impl holds, and any time that it *does* hold, there will be a more specializing non-default impl that also is assembled.

This is because `default impl<T> Foo for T {}` actually expands to `impl<T> Foo for T where T: Foo {}`. The only way to satisfy that where clause (without coinduction) is via *another* implementation that does hold -- precisely an impl that specializes it.

This should fix the specialization related regressions for #116494. That should lead to one root crate regression that doesn't have to do with specialization, which I think we can regress.

r? lcnr cc ``@rust-lang/types``

cc #31844
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions