rust/compiler/rustc_hir_analysis/src/astconv
Guillaume Gomez bb582c6d0f
Rollup merge of #122123 - compiler-errors:object-trait-alias-bounds, r=oli-obk
Don't require specifying unrelated assoc types when trait alias is in `dyn` type

Object types must specify the associated types for all of the principal trait ref's supertraits. However, we weren't doing elaboration properly, so we incorrectly errored with erroneous suggestions to specify associated types that were unrelated to that principal trait ref. To fix this, use proper supertrait elaboration when expanding trait aliases in `conv_object_ty_poly_trait_ref`.

**NOTE**: Please use the ignore-whitespace option when reviewing. This only touches a handful of lines.

r? oli-obk or please feel free to reassign.

Fixes #122118
2024-03-07 15:07:09 +01:00
..
bounds.rs Expand weak alias types before collecting constrained and referenced late bound regions 2024-02-20 17:31:54 +01:00
errors.rs Rename DiagnosticBuilder as Diag. 2024-02-28 08:55:35 +11:00
generics.rs Rename StructuredDiagnostic as StructuredDiag. 2024-03-05 12:15:12 +11:00
lint.rs Handle stashing of delayed bugs. 2024-03-01 10:18:54 +11:00
mod.rs Apply EarlyBinder only to TraitRef in ImplTraitHeader 2024-03-07 13:56:29 +01:00
object_safety.rs Don't require specifying unrelated assoc types when trait alias is in dyn type 2024-03-07 01:32:01 +00:00