rust/tests
Dylan DPC be4f9f5bec
Rollup merge of #110512 - compiler-errors:fix-elaboration-with-associated-type-bounds, r=spastorino
Fix elaboration with associated type bounds

When computing a trait's supertrait predicates, do not add any associated type *trait* bounds to that list of supertrait predicates. This is because supertrait predicates are expected to have the same `Self` type as the trait.

For example, given:

```rust
trait Foo: Bar<Assoc: Send>
```

Before, we would compute that the supertrait predicates of `T: Foo` are `T: Bar` and `<T as Bar>::Assoc: Send`. However, the last bound is a trait predicate for a totally different type than `T`, and existing code that uses supertrait bounds such as vtable construction, closure fn signature deduction, etc. all rely on the invariant that we have a list of predicates for self type `T`.

Fixes #76593

The reason for all the extra diagnostic noise is that we're recomputing predicates with a different filter now. These diagnostics should be deduplicated for any end-user though.

---

This does bring up an interesting question -- is the predicate `<T as Bar>::Assoc: Send` an implied bound of `T: Foo`? Because currently the only bounds implied by a (non-alias) trait are its supertraits. I guess I could fix this too, but it would require even more changes, and I'm inclined to punt this question along.
2023-05-02 11:44:51 +05:30
..
assembly Add loongarch64 asm! support 2023-04-25 14:15:31 +08:00
auxiliary
codegen Codegen fewer instructions in mem::replace 2023-04-30 22:33:04 -07:00
codegen-units Turn off inlining for codegen-unit tests 2023-04-07 15:46:45 -04:00
debuginfo Rollup merge of #108668 - gibbyfree:stabilizedebuggervisualizer, r=wesleywiser 2023-05-02 11:44:51 +05:30
incremental Turn on ConstDebugInfo pass. 2023-04-22 23:41:48 +02:00
mir-opt Auto merge of #111010 - scottmcm:mem-replace-simpler, r=WaffleLapkin 2023-05-01 14:29:15 +00:00
pretty Rollup merge of #111042 - Zalathar:no-coverage, r=wesleywiser 2023-05-01 17:10:24 +02:00
run-make Auto merge of #106075 - nbdd0121:ffi-unwind, r=joshtriplett 2023-05-02 00:45:04 +00:00
run-make-fulldeps Bless run-make-fulldeps test. 2023-04-20 18:03:33 +00:00
run-pass-valgrind
rustdoc Rollup merge of #110631 - notriddle:notriddle/impl-trait-cycle, r=GuillaumeGomez 2023-04-30 16:25:46 +02:00
rustdoc-gui rustdoc: remove unneeded handleKey from settings.js 2023-04-21 16:42:23 -07:00
rustdoc-js rustdoc-search: add support for nested generics 2023-04-14 14:55:45 -07:00
rustdoc-js-std rustdoc-search: add support for nested generics 2023-04-14 14:55:45 -07:00
rustdoc-json Update tests 2023-04-29 13:01:46 +01:00
rustdoc-ui Don't use implied trait predicates in gather_explicit_predicates_of 2023-05-01 15:45:28 +00:00
ui Rollup merge of #110512 - compiler-errors:fix-elaboration-with-associated-type-bounds, r=spastorino 2023-05-02 11:44:51 +05:30
ui-fulldeps Add Call terminator to SMIR 2023-04-20 12:00:41 -03:00
COMPILER_TESTS.md