@@ -2275,21 +2275,15 @@ pub enum ImplItemKind<'hir> {
2275
2275
Type ( & ' hir Ty < ' hir > ) ,
2276
2276
}
2277
2277
2278
- /// Bind a type to an associated type (i.e., `A = Foo`) .
2278
+ /// An associated item binding .
2279
2279
///
2280
- /// Bindings like `A: Debug` are represented as a special type `A =
2281
- /// $::Debug` that is understood by the astconv code.
2280
+ /// ### Examples
2282
2281
///
2283
- /// FIXME(alexreg): why have a separate type for the binding case,
2284
- /// wouldn't it be better to make the `ty` field an enum like the
2285
- /// following?
2286
- ///
2287
- /// ```ignore (pseudo-rust)
2288
- /// enum TypeBindingKind {
2289
- /// Equals(...),
2290
- /// Binding(...),
2291
- /// }
2292
- /// ```
2282
+ /// * `Trait<A = Ty, B = Ty>`
2283
+ /// * `Trait<G<Ty> = Ty>`
2284
+ /// * `Trait<A: Bound>`
2285
+ /// * `Trait<C = { Ct }>` (under feature `associated_const_equality`)
2286
+ /// * `Trait<f(): Bound>` (under feature `return_type_notation`)
2293
2287
#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
2294
2288
pub struct TypeBinding < ' hir > {
2295
2289
pub hir_id : HirId ,
@@ -2322,7 +2316,7 @@ impl<'hir> From<AnonConst> for Term<'hir> {
2322
2316
pub enum TypeBindingKind < ' hir > {
2323
2317
/// E.g., `Foo<Bar: Send>`.
2324
2318
Constraint { bounds : & ' hir [ GenericBound < ' hir > ] } ,
2325
- /// E.g., `Foo<Bar = ()>`, `Foo<Bar = ()>`
2319
+ /// E.g., `Foo<Bar = ()>`.
2326
2320
Equality { term : Term < ' hir > } ,
2327
2321
}
2328
2322
0 commit comments