@@ -2289,21 +2289,15 @@ pub enum ImplItemKind<'hir> {
2289
2289
Type ( & ' hir Ty < ' hir > ) ,
2290
2290
}
2291
2291
2292
- /// Bind a type to an associated type (i.e., `A = Foo`) .
2292
+ /// An associated item binding .
2293
2293
///
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
2296
2295
///
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`)
2307
2301
#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
2308
2302
pub struct TypeBinding < ' hir > {
2309
2303
pub hir_id : HirId ,
@@ -2336,7 +2330,7 @@ impl<'hir> From<AnonConst> for Term<'hir> {
2336
2330
pub enum TypeBindingKind < ' hir > {
2337
2331
/// E.g., `Foo<Bar: Send>`.
2338
2332
Constraint { bounds : & ' hir [ GenericBound < ' hir > ] } ,
2339
- /// E.g., `Foo<Bar = ()>`, `Foo<Bar = ()>`
2333
+ /// E.g., `Foo<Bar = ()>`.
2340
2334
Equality { term : Term < ' hir > } ,
2341
2335
}
2342
2336
0 commit comments