diff options
Diffstat (limited to 'crates/ra_syntax/src/ast')
-rw-r--r-- | crates/ra_syntax/src/ast/edit.rs | 8 | ||||
-rw-r--r-- | crates/ra_syntax/src/ast/generated/nodes.rs | 14 |
2 files changed, 11 insertions, 11 deletions
diff --git a/crates/ra_syntax/src/ast/edit.rs b/crates/ra_syntax/src/ast/edit.rs index 8d3e42f25..04746ef8f 100644 --- a/crates/ra_syntax/src/ast/edit.rs +++ b/crates/ra_syntax/src/ast/edit.rs | |||
@@ -237,17 +237,17 @@ impl ast::Path { | |||
237 | 237 | ||
238 | impl ast::PathSegment { | 238 | impl ast::PathSegment { |
239 | #[must_use] | 239 | #[must_use] |
240 | pub fn with_type_args(&self, type_args: ast::TypeArgList) -> ast::PathSegment { | 240 | pub fn with_type_args(&self, type_args: ast::GenericArgList) -> ast::PathSegment { |
241 | self._with_type_args(type_args, false) | 241 | self._with_type_args(type_args, false) |
242 | } | 242 | } |
243 | 243 | ||
244 | #[must_use] | 244 | #[must_use] |
245 | pub fn with_turbo_fish(&self, type_args: ast::TypeArgList) -> ast::PathSegment { | 245 | pub fn with_turbo_fish(&self, type_args: ast::GenericArgList) -> ast::PathSegment { |
246 | self._with_type_args(type_args, true) | 246 | self._with_type_args(type_args, true) |
247 | } | 247 | } |
248 | 248 | ||
249 | fn _with_type_args(&self, type_args: ast::TypeArgList, turbo: bool) -> ast::PathSegment { | 249 | fn _with_type_args(&self, type_args: ast::GenericArgList, turbo: bool) -> ast::PathSegment { |
250 | if let Some(old) = self.type_arg_list() { | 250 | if let Some(old) = self.generic_arg_list() { |
251 | return self.replace_children( | 251 | return self.replace_children( |
252 | single_node(old.syntax().clone()), | 252 | single_node(old.syntax().clone()), |
253 | iter::once(type_args.syntax().clone().into()), | 253 | iter::once(type_args.syntax().clone().into()), |
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 1a707ad67..903646149 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs | |||
@@ -24,7 +24,7 @@ impl PathSegment { | |||
24 | pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) } | 24 | pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) } |
25 | pub fn super_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![super]) } | 25 | pub fn super_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![super]) } |
26 | pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } | 26 | pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } |
27 | pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) } | 27 | pub fn generic_arg_list(&self) -> Option<GenericArgList> { support::child(&self.syntax) } |
28 | pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } | 28 | pub fn param_list(&self) -> Option<ParamList> { support::child(&self.syntax) } |
29 | pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } | 29 | pub fn ret_type(&self) -> Option<RetType> { support::child(&self.syntax) } |
30 | pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) } | 30 | pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) } |
@@ -40,10 +40,10 @@ impl NameRef { | |||
40 | pub fn ident_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ident]) } | 40 | pub fn ident_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ident]) } |
41 | } | 41 | } |
42 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 42 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
43 | pub struct TypeArgList { | 43 | pub struct GenericArgList { |
44 | pub(crate) syntax: SyntaxNode, | 44 | pub(crate) syntax: SyntaxNode, |
45 | } | 45 | } |
46 | impl TypeArgList { | 46 | impl GenericArgList { |
47 | pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) } | 47 | pub fn coloncolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![::]) } |
48 | pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) } | 48 | pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) } |
49 | pub fn type_args(&self) -> AstChildren<TypeArg> { support::children(&self.syntax) } | 49 | pub fn type_args(&self) -> AstChildren<TypeArg> { support::children(&self.syntax) } |
@@ -803,7 +803,7 @@ impl MethodCallExpr { | |||
803 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 803 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
804 | pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) } | 804 | pub fn dot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![.]) } |
805 | pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } | 805 | pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } |
806 | pub fn type_arg_list(&self) -> Option<TypeArgList> { support::child(&self.syntax) } | 806 | pub fn generic_arg_list(&self) -> Option<GenericArgList> { support::child(&self.syntax) } |
807 | } | 807 | } |
808 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 808 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
809 | pub struct ParenExpr { | 809 | pub struct ParenExpr { |
@@ -1434,8 +1434,8 @@ impl AstNode for NameRef { | |||
1434 | } | 1434 | } |
1435 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1435 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1436 | } | 1436 | } |
1437 | impl AstNode for TypeArgList { | 1437 | impl AstNode for GenericArgList { |
1438 | fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ARG_LIST } | 1438 | fn can_cast(kind: SyntaxKind) -> bool { kind == GENERIC_ARG_LIST } |
1439 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1439 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
1440 | if Self::can_cast(syntax.kind()) { | 1440 | if Self::can_cast(syntax.kind()) { |
1441 | Some(Self { syntax }) | 1441 | Some(Self { syntax }) |
@@ -3445,7 +3445,7 @@ impl std::fmt::Display for NameRef { | |||
3445 | std::fmt::Display::fmt(self.syntax(), f) | 3445 | std::fmt::Display::fmt(self.syntax(), f) |
3446 | } | 3446 | } |
3447 | } | 3447 | } |
3448 | impl std::fmt::Display for TypeArgList { | 3448 | impl std::fmt::Display for GenericArgList { |
3449 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3449 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3450 | std::fmt::Display::fmt(self.syntax(), f) | 3450 | std::fmt::Display::fmt(self.syntax(), f) |
3451 | } | 3451 | } |