aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
authorveetaha <[email protected]>2020-05-10 17:59:48 +0100
committerveetaha <[email protected]>2020-05-10 18:21:46 +0100
commita19b164661675be6a03cacfbc652cbd5f06492a0 (patch)
treee4eec2621723596e9bdbe8022157ee6b3b005fff /crates/ra_syntax/src
parenteedf11ae8897083ba4d5f64e6bce38f4e19cd8e2 (diff)
Correct path docs and add colon2 token to Path ast node
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs22
1 files changed, 14 insertions, 8 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)