@@ -2289,21 +2289,15 @@ pub enum ImplItemKind<'hir> {
22892289 Type ( & ' hir Ty < ' hir > ) ,
22902290}
22912291
2292- /// Bind a type to an associated type (i.e., `A = Foo`) .
2292+ /// An associated item binding .
22932293///
2294- /// Bindings like `A: Debug` are represented as a special type `A =
2295- /// $::Debug` that is understood by the HIR ty lowering code.
2294+ /// ### Examples
22962295///
2297- /// FIXME(alexreg): why have a separate type for the binding case,
2298- /// wouldn't it be better to make the `ty` field an enum like the
2299- /// following?
2300- ///
2301- /// ```ignore (pseudo-rust)
2302- /// enum TypeBindingKind {
2303- /// Equals(...),
2304- /// Binding(...),
2305- /// }
2306- /// ```
2296+ /// * `Trait<A = Ty, B = Ty>`
2297+ /// * `Trait<G<Ty> = Ty>`
2298+ /// * `Trait<A: Bound>`
2299+ /// * `Trait<C = { Ct }>` (under feature `associated_const_equality`)
2300+ /// * `Trait<f(): Bound>` (under feature `return_type_notation`)
23072301#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
23082302pub struct TypeBinding < ' hir > {
23092303 pub hir_id : HirId ,
@@ -2336,7 +2330,7 @@ impl<'hir> From<AnonConst> for Term<'hir> {
23362330pub enum TypeBindingKind < ' hir > {
23372331 /// E.g., `Foo<Bar: Send>`.
23382332 Constraint { bounds : & ' hir [ GenericBound < ' hir > ] } ,
2339- /// E.g., `Foo<Bar = ()>`, `Foo<Bar = ()>`
2333+ /// E.g., `Foo<Bar = ()>`.
23402334 Equality { term : Term < ' hir > } ,
23412335}
23422336
0 commit comments