@@ -2275,21 +2275,15 @@ pub enum ImplItemKind<'hir> {
22752275 Type ( & ' hir Ty < ' hir > ) ,
22762276}
22772277
2278- /// Bind a type to an associated type (i.e., `A = Foo`) .
2278+ /// An associated item binding .
22792279///
2280- /// Bindings like `A: Debug` are represented as a special type `A =
2281- /// $::Debug` that is understood by the astconv code.
2280+ /// ### Examples
22822281///
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`)
22932287#[ derive( Debug , Clone , Copy , HashStable_Generic ) ]
22942288pub struct TypeBinding < ' hir > {
22952289 pub hir_id : HirId ,
@@ -2322,7 +2316,7 @@ impl<'hir> From<AnonConst> for Term<'hir> {
23222316pub enum TypeBindingKind < ' hir > {
23232317 /// E.g., `Foo<Bar: Send>`.
23242318 Constraint { bounds : & ' hir [ GenericBound < ' hir > ] } ,
2325- /// E.g., `Foo<Bar = ()>`, `Foo<Bar = ()>`
2319+ /// E.g., `Foo<Bar = ()>`.
23262320 Equality { term : Term < ' hir > } ,
23272321}
23282322
0 commit comments