Add example with const in TypeBound as per flodiebold

This commit is contained in:
veetaha 2020-05-10 19:24:06 +03:00
parent 5707c2d7a6
commit eedf11ae88
2 changed files with 3 additions and 5 deletions

View file

@ -1971,7 +1971,7 @@ impl LifetimeParam {
/// where /// where
/// T: ❰ Send ❱ + ❰ Sync ❱ /// T: ❰ Send ❱ + ❰ Sync ❱
/// { /// {
/// type Baz: ❰ !Sync ❱ + ❰ Debug ❱; /// type Baz: ❰ !Sync ❱ + ❰ Debug ❱ + ❰ ?const Add ❱;
/// } /// }
/// ``` /// ```
/// ///

View file

@ -1640,8 +1640,6 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
/// [Reference](https://doc.rust-lang.org/reference/items/generics.html) /// [Reference](https://doc.rust-lang.org/reference/items/generics.html)
struct LifetimeParam: AttrsOwner { T![lifetime] } struct LifetimeParam: AttrsOwner { T![lifetime] }
// TODO: better clarify where is the colon token and what `const` pertains to.
// TODO: add example with `const`
/// Type bound declaration clause. /// Type bound declaration clause.
/// ///
/// ``` /// ```
@ -1651,7 +1649,7 @@ pub(crate) const AST_SRC: AstSrc = AstSrc {
/// where /// where
/// T: ❰ Send ❱ + ❰ Sync ❱ /// T: ❰ Send ❱ + ❰ Sync ❱
/// { /// {
/// type Baz: ❰ !Sync ❱ + ❰ Debug ❱; /// type Baz: ❰ !Sync ❱ + ❰ Debug ❱ + ❰ ?const Add ❱;
/// } /// }
/// ``` /// ```
/// ///