aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs22
-rw-r--r--xtask/src/ast_src.rs26
2 files changed, 28 insertions, 20 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index a8360dfef..fc6733d64 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -2323,10 +2323,10 @@ impl ArgList {
2323/// generic parameters. 2323/// generic parameters.
2324/// 2324///
2325/// ``` 2325/// ```
2326/// (0..10).❰ collect � ::<Vec<_>> ❱(); 2326/// (0..10).❰ collect � ::<Vec<_>> ❱();
2327/// ❰ Vec � ::<u8> � ::with_capacity ❱ ❱ ❱(1024); 2327/// ❰ ❰ ❰ Vec � ::<u8> � ::with_capacity ❱(1024);
2328/// ❰ <Foo as Bar> ::baz ❱ ❱(); 2328/// ❰ <Foo as ❰ ❰ bar � ::Bar> ::baz ❱();
2329/// ❰ <bruh> � ::bruuh ❱(); 2329/// ❰ <bruh> � ::bruuh ❱();
2330/// ``` 2330/// ```
2331/// 2331///
2332/// [Reference](https://doc.rust-lang.org/reference/paths.html) 2332/// [Reference](https://doc.rust-lang.org/reference/paths.html)
@@ -2336,15 +2336,21 @@ pub struct Path {
2336} 2336}
2337impl Path { 2337impl Path {
2338 pub fn segment(&self) -> Option<PathSegment> { support::child(&self.syntax) } 2338 pub fn segment(&self) -> Option<PathSegment> { support::child(&self.syntax) }
2339 pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
2339 pub fn qualifier(&self) -> Option<Path> { support::child(&self.syntax) } 2340 pub fn qualifier(&self) -> Option<Path> { support::child(&self.syntax) }
2340} 2341}
2341/// Segment of the path to a symbol. 2342/// Segment of the path to a symbol.
2343/// Only path segment of an absolute path holds the `::` token,
2344/// all other `::` tokens that connect path segments reside under `Path` itself.`
2342/// 2345///
2343/// ``` 2346/// ```
2344/// (0..10).❰ collect ❱ ❰ ::<Vec<_>> ❱(); 2347/// (0..10).❰ collect ❱ :: ❰ <Vec<_>> ❱();
2345/// ❰ Vec >| ❰ ::<u8> ❱ ❰ ::with_capacity ❱(1024); 2348/// ❰ Vec ❱ :: ❰ <u8> ❱ :: ❰ with_capacity ❱(1024);
2346/// ❰ <Foo as Bar> ❱ ❰ ::baz ❱(); 2349/// ❰ <❰ Foo ❱ as ❰ bar ❱ :: ❰ Bar ❱> ❱ :: ❰ baz ❱();
2347/// ❰ <bruh> ❱ ❰ ::bruuh ❱(); 2350/// ❰ <❰ bruh ❱> ❱ :: ❰ bruuh ❱();
2351///
2352/// // Note that only in this case `::` token is inlcuded:
2353/// ❰ ::foo ❱;
2348/// ``` 2354/// ```
2349/// 2355///
2350/// [Reference](https://doc.rust-lang.org/reference/paths.html) 2356/// [Reference](https://doc.rust-lang.org/reference/paths.html)
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;