diff options
author | veetaha <[email protected]> | 2020-05-10 17:59:48 +0100 |
---|---|---|
committer | veetaha <[email protected]> | 2020-05-10 18:21:46 +0100 |
commit | a19b164661675be6a03cacfbc652cbd5f06492a0 (patch) | |
tree | e4eec2621723596e9bdbe8022157ee6b3b005fff /xtask | |
parent | eedf11ae8897083ba4d5f64e6bce38f4e19cd8e2 (diff) |
Correct path docs and add colon2 token to Path ast node
Diffstat (limited to 'xtask')
-rw-r--r-- | xtask/src/ast_src.rs | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs index 2a8a5378d..61580bd1a 100644 --- a/xtask/src/ast_src.rs +++ b/xtask/src/ast_src.rs | |||
@@ -1893,32 +1893,35 @@ pub(crate) const AST_SRC: AstSrc = AstSrc { | |||
1893 | T![')'] | 1893 | T![')'] |
1894 | } | 1894 | } |
1895 | 1895 | ||
1896 | // TODO: correct the example | ||
1897 | /// Path to a symbol. Includes single identifier names and elaborate paths with | 1896 | /// Path to a symbol. Includes single identifier names and elaborate paths with |
1898 | /// generic parameters. | 1897 | /// generic parameters. |
1899 | /// | 1898 | /// |
1900 | /// ``` | 1899 | /// ``` |
1901 | /// (0..10).❰ collect �� ::<Vec<_>> ❱ ❱(); | 1900 | /// (0..10).❰ ❰ collect �� ::<Vec<_>> ❱(); |
1902 | /// ❰ Vec �� ::<u8> �� ::with_capacity ❱ ❱ ❱(1024); | 1901 | /// ❰ ❰ ❰ Vec �� ::<u8> �� ::with_capacity ❱(1024); |
1903 | /// ❰ <Foo as Bar> �� ::baz ❱ ❱(); | 1902 | /// ❰ ❰ <❰ Foo ❱ as ❰ ❰ bar �� ::Bar ❱> ❱ ::baz ❱(); |
1904 | /// ❰ <bruh> �� ::bruuh ❱ ❱(); | 1903 | /// ❰ ❰ <❰ bruh ❱> �� ::bruuh ❱(); |
1905 | /// ``` | 1904 | /// ``` |
1906 | /// | 1905 | /// |
1907 | /// [Reference](https://doc.rust-lang.org/reference/paths.html) | 1906 | /// [Reference](https://doc.rust-lang.org/reference/paths.html) |
1908 | struct Path { | 1907 | struct Path { |
1909 | segment: PathSegment, | 1908 | segment: PathSegment, |
1909 | T![::], | ||
1910 | qualifier: Path, | 1910 | qualifier: Path, |
1911 | } | 1911 | } |
1912 | 1912 | ||
1913 | // TODO: verify the example | ||
1914 | // TODO: what RetType is doing here? is this for Fn() -> T syntax? | ||
1915 | /// Segment of the path to a symbol. | 1913 | /// Segment of the path to a symbol. |
1914 | /// Only path segment of an absolute path holds the `::` token, | ||
1915 | /// all other `::` tokens that connect path segments reside under `Path` itself.` | ||
1916 | /// | 1916 | /// |
1917 | /// ``` | 1917 | /// ``` |
1918 | /// (0..10).❰ collect ❱ ❰ ::<Vec<_>> ❱(); | 1918 | /// (0..10).❰ collect ❱ :: ❰ <Vec<_>> ❱(); |
1919 | /// ❰ Vec >| ❰ ::<u8> ❱ ❰ ::with_capacity ❱(1024); | 1919 | /// ❰ Vec ❱ :: ❰ <u8> ❱ :: ❰ with_capacity ❱(1024); |
1920 | /// ❰ <Foo as Bar> ❱ ❰ ::baz ❱(); | 1920 | /// ❰ <❰ Foo ❱ as ❰ bar ❱ :: ❰ Bar ❱> ❱ :: ❰ baz ❱(); |
1921 | /// ❰ <bruh> ❱ ❰ ::bruuh ❱(); | 1921 | /// ❰ <❰ bruh ❱> ❱ :: ❰ bruuh ❱(); |
1922 | /// | ||
1923 | /// // Note that only in this case `::` token is inlcuded: | ||
1924 | /// ❰ ::foo ❱; | ||
1922 | /// ``` | 1925 | /// ``` |
1923 | /// | 1926 | /// |
1924 | /// [Reference](https://doc.rust-lang.org/reference/paths.html) | 1927 | /// [Reference](https://doc.rust-lang.org/reference/paths.html) |
@@ -1956,7 +1959,6 @@ pub(crate) const AST_SRC: AstSrc = AstSrc { | |||
1956 | /// [Reference](https://doc.rust-lang.org/reference/paths.html#paths-in-expressions) | 1959 | /// [Reference](https://doc.rust-lang.org/reference/paths.html#paths-in-expressions) |
1957 | struct TypeArg { TypeRef } | 1960 | struct TypeArg { TypeRef } |
1958 | 1961 | ||
1959 | // TODO: verify inline type bounds example | ||
1960 | /// Associated type argument that is passed at generic instantiation site. | 1962 | /// Associated type argument that is passed at generic instantiation site. |
1961 | /// ``` | 1963 | /// ``` |
1962 | /// use foo::<'a, u64, bool, ❰ Item = Bar ❱, 42>::baz; | 1964 | /// use foo::<'a, u64, bool, ❰ Item = Bar ❱, 42>::baz; |