diff options
author | veetaha <[email protected]> | 2020-05-10 19:44:14 +0100 |
---|---|---|
committer | veetaha <[email protected]> | 2020-05-10 19:44:14 +0100 |
commit | 8a298eed7a2f68fdf014f92e5b5a7010dcae1f0b (patch) | |
tree | cd7aa849f635d031d78c8e4b8eecd60a00beb831 /xtask | |
parent | f5e2e02aa9864f5c929ff36f99cde5fd4be2544e (diff) |
Resolve todos about refs and empty statements
Diffstat (limited to 'xtask')
-rw-r--r-- | xtask/src/ast_src.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs index 821b13378..deb9f690d 100644 --- a/xtask/src/ast_src.rs +++ b/xtask/src/ast_src.rs | |||
@@ -1349,9 +1349,9 @@ pub(crate) const AST_SRC: AstSrc = AstSrc { | |||
1349 | /// | 1349 | /// |
1350 | /// ``` | 1350 | /// ``` |
1351 | /// let ❰ &mut foo ❱ = bar; | 1351 | /// let ❰ &mut foo ❱ = bar; |
1352 | /// | ||
1353 | /// let ❰ & ❰ &mut ❰ &_ ❱ ❱ ❱ = baz; | ||
1352 | /// ``` | 1354 | /// ``` |
1353 | /// // TODO: clarify on the special case of double reference pattern | ||
1354 | /// // described in the link bellow | ||
1355 | /// | 1355 | /// |
1356 | /// [Reference](https://doc.rust-lang.org/reference/patterns.html#reference-patterns) | 1356 | /// [Reference](https://doc.rust-lang.org/reference/patterns.html#reference-patterns) |
1357 | struct RefPat { T![&], T![mut], Pat } | 1357 | struct RefPat { T![&], T![mut], Pat } |
@@ -1714,16 +1714,13 @@ pub(crate) const AST_SRC: AstSrc = AstSrc { | |||
1714 | /// - [FFI function pointers reference](https://doc.rust-lang.org/reference/items/functions.html#functions) | 1714 | /// - [FFI function pointers reference](https://doc.rust-lang.org/reference/items/functions.html#functions) |
1715 | struct Abi { /*String*/ } | 1715 | struct Abi { /*String*/ } |
1716 | 1716 | ||
1717 | // TODO: clarify how empty statements are handled | ||
1718 | /// Expression statement. | 1717 | /// Expression statement. |
1719 | /// Note: may be empty (i.e. only semicolon). | ||
1720 | /// | 1718 | /// |
1721 | /// ``` | 1719 | /// ``` |
1722 | /// ❰ 42; ❱ | 1720 | /// ❰ 42; ❱ |
1723 | /// ❰ foo(); ❱ | 1721 | /// ❰ foo(); ❱ |
1724 | /// ❰ (); ❱ | 1722 | /// ❰ (); ❱ |
1725 | /// ❰ {}; ❱ | 1723 | /// ❰ {}; ❱ |
1726 | /// ❰ /* empty */; ❱ | ||
1727 | /// | 1724 | /// |
1728 | /// // constructions with trailing curly brace can omit the semicolon // TODO: clarify | 1725 | /// // constructions with trailing curly brace can omit the semicolon // TODO: clarify |
1729 | /// ❰ if bool_cond { } ❱ | 1726 | /// ❰ if bool_cond { } ❱ |
@@ -2201,6 +2198,8 @@ pub(crate) const AST_SRC: AstSrc = AstSrc { | |||
2201 | enum AttrInput { Literal, TokenTree } | 2198 | enum AttrInput { Literal, TokenTree } |
2202 | 2199 | ||
2203 | /// Any kind of statement | 2200 | /// Any kind of statement |
2201 | /// Note: there are no empty statements, these are just represented as | ||
2202 | /// bare semicolons without a dedicated statement ast node. | ||
2204 | enum Stmt { | 2203 | enum Stmt { |
2205 | LetStmt, | 2204 | LetStmt, |
2206 | ExprStmt, | 2205 | ExprStmt, |