From 8a298eed7a2f68fdf014f92e5b5a7010dcae1f0b Mon Sep 17 00:00:00 2001 From: veetaha Date: Sun, 10 May 2020 21:44:14 +0300 Subject: Resolve todos about refs and empty statements --- xtask/src/ast_src.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'xtask/src') 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 { /// /// ``` /// let ❰ &mut foo ❱ = bar; + /// + /// let ❰ & ❰ &mut ❰ &_ ❱ ❱ ❱ = baz; /// ``` - /// // TODO: clarify on the special case of double reference pattern - /// // described in the link bellow /// /// [Reference](https://doc.rust-lang.org/reference/patterns.html#reference-patterns) struct RefPat { T![&], T![mut], Pat } @@ -1714,16 +1714,13 @@ pub(crate) const AST_SRC: AstSrc = AstSrc { /// - [FFI function pointers reference](https://doc.rust-lang.org/reference/items/functions.html#functions) struct Abi { /*String*/ } - // TODO: clarify how empty statements are handled /// Expression statement. - /// Note: may be empty (i.e. only semicolon). /// /// ``` /// ❰ 42; ❱ /// ❰ foo(); ❱ /// ❰ (); ❱ /// ❰ {}; ❱ - /// ❰ /* empty */; ❱ /// /// // constructions with trailing curly brace can omit the semicolon // TODO: clarify /// ❰ if bool_cond { } ❱ @@ -2201,6 +2198,8 @@ pub(crate) const AST_SRC: AstSrc = AstSrc { enum AttrInput { Literal, TokenTree } /// Any kind of statement + /// Note: there are no empty statements, these are just represented as + /// bare semicolons without a dedicated statement ast node. enum Stmt { LetStmt, ExprStmt, -- cgit v1.2.3