From 4eff8ddb8b8352d432d87198d43c674696ca9344 Mon Sep 17 00:00:00 2001 From: Hrvoje Ban Date: Thu, 24 Jan 2019 18:21:17 +0100 Subject: Fill in DocumentSymbol::detail --- crates/ra_syntax/src/ast/generated.rs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'crates/ra_syntax/src/ast') diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index ac6c8a835..be16511df 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs @@ -526,7 +526,11 @@ impl ast::NameOwner for ConstDef {} impl ast::TypeParamsOwner for ConstDef {} impl ast::AttrsOwner for ConstDef {} impl ast::DocCommentsOwner for ConstDef {} -impl ConstDef {} +impl ConstDef { + pub fn type_ref(&self) -> Option<&TypeRef> { + super::child_opt(self) + } +} // ContinueExpr #[derive(Debug, PartialEq, Eq, Hash)] @@ -3015,7 +3019,11 @@ impl ast::NameOwner for StaticDef {} impl ast::TypeParamsOwner for StaticDef {} impl ast::AttrsOwner for StaticDef {} impl ast::DocCommentsOwner for StaticDef {} -impl StaticDef {} +impl StaticDef { + pub fn type_ref(&self) -> Option<&TypeRef> { + super::child_opt(self) + } +} // Stmt #[derive(Debug, PartialEq, Eq, Hash)] @@ -3491,7 +3499,11 @@ impl ast::NameOwner for TypeDef {} impl ast::TypeParamsOwner for TypeDef {} impl ast::AttrsOwner for TypeDef {} impl ast::DocCommentsOwner for TypeDef {} -impl TypeDef {} +impl TypeDef { + pub fn type_ref(&self) -> Option<&TypeRef> { + super::child_opt(self) + } +} // TypeParam #[derive(Debug, PartialEq, Eq, Hash)] -- cgit v1.2.3