diff options
author | veetaha <[email protected]> | 2020-05-10 17:24:06 +0100 |
---|---|---|
committer | veetaha <[email protected]> | 2020-05-10 17:24:06 +0100 |
commit | eedf11ae8897083ba4d5f64e6bce38f4e19cd8e2 (patch) | |
tree | 0c937c52f734253ff3c4ce5cd17c08d3e560f596 | |
parent | 5707c2d7a6c7fcf65bab5c700f625e29f594721b (diff) |
Add example with const in TypeBound as per flodiebold
-rw-r--r-- | crates/ra_syntax/src/ast/generated/nodes.rs | 2 | ||||
-rw-r--r-- | xtask/src/ast_src.rs | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index c0f27a0f7..a8360dfef 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs | |||
@@ -1971,7 +1971,7 @@ impl LifetimeParam { | |||
1971 | /// where | 1971 | /// where |
1972 | /// T: ❰ Send ❱ + ❰ Sync ❱ | 1972 | /// T: ❰ Send ❱ + ❰ Sync ❱ |
1973 | /// { | 1973 | /// { |
1974 | /// type Baz: ❰ !Sync ❱ + ❰ Debug ❱; | 1974 | /// type Baz: ❰ !Sync ❱ + ❰ Debug ❱ + ❰ ?const Add ❱; |
1975 | /// } | 1975 | /// } |
1976 | /// ``` | 1976 | /// ``` |
1977 | /// | 1977 | /// |
diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs index 16222b3c4..2a8a5378d 100644 --- a/xtask/src/ast_src.rs +++ b/xtask/src/ast_src.rs | |||
@@ -1640,8 +1640,6 @@ pub(crate) const AST_SRC: AstSrc = AstSrc { | |||
1640 | /// [Reference](https://doc.rust-lang.org/reference/items/generics.html) | 1640 | /// [Reference](https://doc.rust-lang.org/reference/items/generics.html) |
1641 | struct LifetimeParam: AttrsOwner { T![lifetime] } | 1641 | struct LifetimeParam: AttrsOwner { T![lifetime] } |
1642 | 1642 | ||
1643 | // TODO: better clarify where is the colon token and what `const` pertains to. | ||
1644 | // TODO: add example with `const` | ||
1645 | /// Type bound declaration clause. | 1643 | /// Type bound declaration clause. |
1646 | /// | 1644 | /// |
1647 | /// ``` | 1645 | /// ``` |
@@ -1651,12 +1649,12 @@ pub(crate) const AST_SRC: AstSrc = AstSrc { | |||
1651 | /// where | 1649 | /// where |
1652 | /// T: ❰ Send ❱ + ❰ Sync ❱ | 1650 | /// T: ❰ Send ❱ + ❰ Sync ❱ |
1653 | /// { | 1651 | /// { |
1654 | /// type Baz: ❰ !Sync ❱ + ❰ Debug ❱; | 1652 | /// type Baz: ❰ !Sync ❱ + ❰ Debug ❱ + ❰ ?const Add ❱; |
1655 | /// } | 1653 | /// } |
1656 | /// ``` | 1654 | /// ``` |
1657 | /// | 1655 | /// |
1658 | /// [Reference](https://doc.rust-lang.org/reference/trait-bounds.html) | 1656 | /// [Reference](https://doc.rust-lang.org/reference/trait-bounds.html) |
1659 | struct TypeBound { T![lifetime], /* Question, */ T![const], /* Question, */ TypeRef } | 1657 | struct TypeBound { T![lifetime], /* Question, */ T![const], /* Question, */ TypeRef } |
1660 | 1658 | ||
1661 | /// Type bounds list. | 1659 | /// Type bounds list. |
1662 | /// | 1660 | /// |