diff options
Diffstat (limited to 'crates/ra_syntax/src/ast')
-rw-r--r-- | crates/ra_syntax/src/ast/extensions.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/ast/generated/nodes.rs | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/ast/extensions.rs b/crates/ra_syntax/src/ast/extensions.rs index 528c873e0..98c38d009 100644 --- a/crates/ra_syntax/src/ast/extensions.rs +++ b/crates/ra_syntax/src/ast/extensions.rs | |||
@@ -467,7 +467,7 @@ impl ast::TokenTree { | |||
467 | 467 | ||
468 | pub fn right_delimiter_token(&self) -> Option<SyntaxToken> { | 468 | pub fn right_delimiter_token(&self) -> Option<SyntaxToken> { |
469 | self.syntax().last_child_or_token()?.into_token().filter(|it| match it.kind() { | 469 | self.syntax().last_child_or_token()?.into_token().filter(|it| match it.kind() { |
470 | T!['{'] | T!['('] | T!['['] => true, | 470 | T!['}'] | T![')'] | T![']'] => true, |
471 | _ => false, | 471 | _ => false, |
472 | }) | 472 | }) |
473 | } | 473 | } |
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 5e844d5ae..c2cc25958 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs | |||
@@ -12,6 +12,7 @@ pub struct SourceFile { | |||
12 | } | 12 | } |
13 | impl ast::ModuleItemOwner for SourceFile {} | 13 | impl ast::ModuleItemOwner for SourceFile {} |
14 | impl ast::AttrsOwner for SourceFile {} | 14 | impl ast::AttrsOwner for SourceFile {} |
15 | impl ast::DocCommentsOwner for SourceFile {} | ||
15 | impl SourceFile { | 16 | impl SourceFile { |
16 | pub fn modules(&self) -> AstChildren<Module> { support::children(&self.syntax) } | 17 | pub fn modules(&self) -> AstChildren<Module> { support::children(&self.syntax) } |
17 | } | 18 | } |
@@ -259,6 +260,7 @@ pub struct ImplDef { | |||
259 | } | 260 | } |
260 | impl ast::TypeParamsOwner for ImplDef {} | 261 | impl ast::TypeParamsOwner for ImplDef {} |
261 | impl ast::AttrsOwner for ImplDef {} | 262 | impl ast::AttrsOwner for ImplDef {} |
263 | impl ast::DocCommentsOwner for ImplDef {} | ||
262 | impl ImplDef { | 264 | impl ImplDef { |
263 | pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) } | 265 | pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) } |
264 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) } | 266 | pub fn const_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![const]) } |