rust/tests
Matthias Krüger da43826398
Rollup merge of #139774 - compiler-errors:supertrait-alias, r=lcnr
Fix replacing supertrait aliases in `ReplaceProjectionWith`

The new solver has a procedure called `predicates_for_object_candidate`, which elaborates the super-bounds and item-bounds that are required to hold for a dyn trait to implement something via a built-in object impl.

In that procedure, there is a folder called `ReplaceProjectionWith` which is responsible for replacing projections that reference `Self`, so that we don't encounter cycles when we then go on to normalize those projections in the process of proving these super-bounds.

That folder had a few problems: Firstly, it wasn't actually checking that this was a super bound originating from `Self`. Secondly, it only accounted for a *single* projection type def id, but trait objects can have multiple (i.e. `trait Foo<A, B>: Bar<A, Assoc = A> + Bar<B, Assoc = B>`).

To fix the first, it's simple enough to just add an equality check for the self ty. To fix the second, I implemented a matching step that's very similar to the `projection_may_match` check we have for upcasting, since on top of having multiple choices, we need to deal with both non-structural matches and ambiguity.

This probably lacks a bit of documentation, but I think it works pretty well.

Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/171

r? lcnr
2025-04-17 17:40:27 +02:00
..
assembly Auto merge of #138011 - tnewsome-lynx:lynxos_178-nostd, r=davidtwco 2025-04-16 22:14:01 +00:00
auxiliary
codegen Auto merge of #139940 - matthiaskrgr:rollup-rd4d3fn, r=matthiaskrgr 2025-04-17 04:52:34 +00:00
codegen-units
coverage Update the minimum external LLVM to 19 2025-04-05 11:44:38 -07:00
coverage-run-rustdoc
crashes Normalize ADT fields in find_tails_for_unsizing 2025-04-14 16:51:00 +00:00
debuginfo replace //@ compile-flags: --edition with //@ edition 2025-04-10 09:56:37 +02:00
incremental UI tests: migrate remaining compile time error-patterns to line annotations 2025-04-13 21:48:53 +03:00
mir-opt Rollup merge of #139767 - compiler-errors:www, r=oli-obk 2025-04-14 18:15:32 +02:00
pretty Rollup merge of #138632 - clubby789:stabilize-cfg-boolean-lit, r=davidtwco,Urgau,traviscross 2025-04-17 06:25:15 +02:00
run-make Auto merge of #136926 - wesleywiser:stabilize_dwarf-version, r=petrochenkov 2025-04-16 06:38:00 +00:00
rustdoc replace //@ compile-flags: --edition with //@ edition 2025-04-10 09:56:37 +02:00
rustdoc-gui Add regression test for #139282 2025-04-07 17:28:46 +02:00
rustdoc-js rustdoc-search: add unbox flag to Result aliases 2025-04-11 11:36:40 -07:00
rustdoc-js-std rustdoc-search: add unbox flag to Result aliases 2025-04-11 11:36:40 -07:00
rustdoc-json rustdoc-json: Add test for #[automatically_derived] attribute 2025-03-31 20:42:49 +00:00
rustdoc-ui Rollup merge of #138632 - clubby789:stabilize-cfg-boolean-lit, r=davidtwco,Urgau,traviscross 2025-04-17 06:25:15 +02:00
ui Rollup merge of #139774 - compiler-errors:supertrait-alias, r=lcnr 2025-04-17 17:40:27 +02:00
ui-fulldeps Move eager translation to a method on Diag 2025-04-16 21:38:59 -04:00
COMPILER_TESTS.md