diff options
Diffstat (limited to 'crates/ra_syntax/src/ast/node_ext.rs')
-rw-r--r-- | crates/ra_syntax/src/ast/node_ext.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_syntax/src/ast/node_ext.rs b/crates/ra_syntax/src/ast/node_ext.rs index 2299988ce..02e6e52c2 100644 --- a/crates/ra_syntax/src/ast/node_ext.rs +++ b/crates/ra_syntax/src/ast/node_ext.rs | |||
@@ -248,11 +248,11 @@ impl ast::RecordFieldPat { | |||
248 | } | 248 | } |
249 | 249 | ||
250 | impl ast::EnumVariant { | 250 | impl ast::EnumVariant { |
251 | pub fn parent_enum(&self) -> ast::EnumDef { | 251 | pub fn parent_enum(&self) -> ast::Enum { |
252 | self.syntax() | 252 | self.syntax() |
253 | .parent() | 253 | .parent() |
254 | .and_then(|it| it.parent()) | 254 | .and_then(|it| it.parent()) |
255 | .and_then(ast::EnumDef::cast) | 255 | .and_then(ast::Enum::cast) |
256 | .expect("EnumVariants are always nested in Enums") | 256 | .expect("EnumVariants are always nested in Enums") |
257 | } | 257 | } |
258 | pub fn kind(&self) -> StructKind { | 258 | pub fn kind(&self) -> StructKind { |
@@ -479,7 +479,7 @@ impl ast::DocCommentsOwner for ast::Struct {} | |||
479 | impl ast::DocCommentsOwner for ast::Union {} | 479 | impl ast::DocCommentsOwner for ast::Union {} |
480 | impl ast::DocCommentsOwner for ast::RecordField {} | 480 | impl ast::DocCommentsOwner for ast::RecordField {} |
481 | impl ast::DocCommentsOwner for ast::TupleField {} | 481 | impl ast::DocCommentsOwner for ast::TupleField {} |
482 | impl ast::DocCommentsOwner for ast::EnumDef {} | 482 | impl ast::DocCommentsOwner for ast::Enum {} |
483 | impl ast::DocCommentsOwner for ast::EnumVariant {} | 483 | impl ast::DocCommentsOwner for ast::EnumVariant {} |
484 | impl ast::DocCommentsOwner for ast::TraitDef {} | 484 | impl ast::DocCommentsOwner for ast::TraitDef {} |
485 | impl ast::DocCommentsOwner for ast::Module {} | 485 | impl ast::DocCommentsOwner for ast::Module {} |