aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast/node_ext.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/ast/node_ext.rs')
-rw-r--r--crates/ra_syntax/src/ast/node_ext.rs6
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
250impl ast::EnumVariant { 250impl 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 {}
479impl ast::DocCommentsOwner for ast::Union {} 479impl ast::DocCommentsOwner for ast::Union {}
480impl ast::DocCommentsOwner for ast::RecordField {} 480impl ast::DocCommentsOwner for ast::RecordField {}
481impl ast::DocCommentsOwner for ast::TupleField {} 481impl ast::DocCommentsOwner for ast::TupleField {}
482impl ast::DocCommentsOwner for ast::EnumDef {} 482impl ast::DocCommentsOwner for ast::Enum {}
483impl ast::DocCommentsOwner for ast::EnumVariant {} 483impl ast::DocCommentsOwner for ast::EnumVariant {}
484impl ast::DocCommentsOwner for ast::TraitDef {} 484impl ast::DocCommentsOwner for ast::TraitDef {}
485impl ast::DocCommentsOwner for ast::Module {} 485impl ast::DocCommentsOwner for ast::Module {}