Skip to content

Commit c1c97b2

Browse files
committed
Fix leading colon
1 parent ddf08da commit c1c97b2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

crates/ra_syntax/src/ast/generated/nodes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ pub struct PathSegment {
1919
pub(crate) syntax: SyntaxNode,
2020
}
2121
impl PathSegment {
22-
pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
2322
pub fn crate_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![crate]) }
2423
pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) }
2524
pub fn super_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![super]) }
25+
pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) }
2626
pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
2727
pub fn generic_arg_list(&self) -> Option<GenericArgList> { support::child(&self.syntax) }
2828
pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) }

xtask/src/codegen/rust.ungram

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ Path =
22
(qualifier:Path '::')? segment:PathSegment
33

44
PathSegment =
5-
'::' | 'crate' | 'self' | 'super'
5+
'crate' | 'self' | 'super'
6+
| '::' NameRef
67
| NameRef GenericArgList?
78
| NameRef ParamList RetType?
89
| '<' PathType ('as' PathType)? '>'

0 commit comments

Comments
 (0)