From eedf11ae8897083ba4d5f64e6bce38f4e19cd8e2 Mon Sep 17 00:00:00 2001 From: veetaha Date: Sun, 10 May 2020 19:24:06 +0300 Subject: Add example with const in TypeBound as per flodiebold --- crates/ra_syntax/src/ast/generated/nodes.rs | 2 +- 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 { /// where /// T: ❰ Send ❱ + ❰ Sync ❱ /// { -/// type Baz: ❰ !Sync ❱ + ❰ Debug ❱; +/// type Baz: ❰ !Sync ❱ + ❰ Debug ❱ + ❰ ?const Add ❱; /// } /// ``` /// 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 { /// [Reference](https://doc.rust-lang.org/reference/items/generics.html) 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. /// /// ``` @@ -1651,12 +1649,12 @@ pub(crate) const AST_SRC: AstSrc = AstSrc { /// where /// T: ❰ Send ❱ + ❰ Sync ❱ /// { - /// type Baz: ❰ !Sync ❱ + ❰ Debug ❱; + /// type Baz: ❰ !Sync ❱ + ❰ Debug ❱ + ❰ ?const Add ❱; /// } /// ``` /// /// [Reference](https://doc.rust-lang.org/reference/trait-bounds.html) - struct TypeBound { T![lifetime], /* Question, */ T![const], /* Question, */ TypeRef } + struct TypeBound { T![lifetime], /* Question, */ T![const], /* Question, */ TypeRef } /// Type bounds list. /// -- cgit v1.2.3