rust/tests/ui/traits/alias
bors cd805f09ff Auto merge of #133830 - compiler-errors:span-key, r=lcnr
Rework dyn trait lowering to stop being so intertwined with trait alias expansion

This PR reworks the trait object lowering code to stop handling trait aliases so funky, and removes the `TraitAliasExpander` in favor of a much simpler design. This refactoring is important for making the code that I'm writing in https://github.com/rust-lang/rust/pull/133397 understandable and easy to maintain, so the diagnostics regressions are IMO inevitable.

In the old trait object lowering code, we used to be a bit sloppy with the lists of traits in their unexpanded and expanded forms. This PR largely rewrites this logic to expand the trait aliases *once* and handle them more responsibly throughout afterwards.

Please review this with whitespace disabled.

r? lcnr
2025-01-21 12:33:33 +00:00
..
auxiliary
ambiguous.rs
ambiguous.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
basic.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
bounds.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
bounds.stderr Update tests 2024-02-07 10:42:01 +08:00
cross-crate.rs Use root obligation on E0277 for some cases 2024-03-03 18:53:35 +00:00
cross-crate.stderr Remove detail from label/note that is already available in other note 2024-10-29 16:26:57 +00:00
dont-elaborate-non-self.rs
dont-elaborate-non-self.stderr On implicit Sized bound on fn argument, point at type instead of pattern 2024-09-27 00:45:02 +00:00
generic-default-in-dyn.rs Rework trait expansion to happen once explicitly 2025-01-15 01:26:24 +00:00
generic-default-in-dyn.stderr Rework trait expansion to happen once explicitly 2025-01-15 01:26:24 +00:00
impl.rs
impl.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
import-cross-crate.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
import.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
infinite_normalization.rs Use trait definition cycle detection for trait alias definitions, too 2025-01-09 08:49:39 +00:00
infinite_normalization.stderr Use trait definition cycle detection for trait alias definitions, too 2025-01-09 08:49:39 +00:00
issue-60021-assoc-method-resolve.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-60755.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-72415-assoc-const-resolve.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-75983.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-83613.rs stabilize -Znext-solver=coherence 2024-10-15 13:11:00 +02:00
issue-83613.stderr stabilize -Znext-solver=coherence 2024-10-15 13:11:00 +02:00
issue-107747-do-not-assemble-supertraits.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-108072-unmet-trait-alias-bound.rs Use root obligation on E0277 for some cases 2024-03-03 18:53:35 +00:00
issue-108072-unmet-trait-alias-bound.stderr Remove detail from label/note that is already available in other note 2024-10-29 16:26:57 +00:00
issue-108132-unmet-trait-alias-bound-on-generic-impl.rs
issue-108132-unmet-trait-alias-bound-on-generic-impl.stderr Use fulfillment, not evaluate, during method probe 2024-04-21 20:10:12 -04:00
maybe-bound.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no-duplicates.rs UI tests: Rename "object safe" to "dyn compatible" 2024-10-10 01:13:29 +02:00
no-duplicates.stderr Rework trait expansion to happen once explicitly 2025-01-15 01:26:24 +00:00
no-extra-traits.rs UI tests: Rename "object safe" to "dyn compatible" 2024-10-10 01:13:29 +02:00
no-extra-traits.stderr Rework trait expansion to happen once explicitly 2025-01-15 01:26:24 +00:00
not-a-marker.rs Don't record trait aliases as marker traits 2024-07-25 00:38:50 -04:00
not-a-marker.stderr Don't record trait aliases as marker traits 2024-07-25 00:38:50 -04:00
object-fail.rs Rework trait expansion to happen once explicitly 2025-01-15 01:26:24 +00:00
object-fail.stderr Rework trait expansion to happen once explicitly 2025-01-15 01:26:24 +00:00
object-wf.rs UI tests: Rename "object safe" to "dyn compatible" 2024-10-10 01:13:29 +02:00
object.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
only-maybe-bound.rs
only-maybe-bound.stderr
only-require-assocs-from-supertraits.rs Don't require specifying unrelated assoc types when trait alias is in dyn type 2024-03-07 01:32:01 +00:00
self-in-const-generics.rs
self-in-const-generics.stderr Rework trait expansion to happen once explicitly 2025-01-15 01:26:24 +00:00
self-in-generics.rs Update (doc) comments 2024-03-22 06:31:51 +01:00
self-in-generics.stderr Rework trait expansion to happen once explicitly 2025-01-15 01:26:24 +00:00
style_lint.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
style_lint.stderr
suggest-trait-alias-instead-of-type.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
suggest-trait-alias-instead-of-type.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
suggest-trait-alias-instead-of-type.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
syntax-fail.rs
syntax-fail.stderr
syntax.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
wf.rs
wf.stderr reword trait bound suggestion message to include the bounds 2024-12-07 21:26:20 +00:00