diff options
Diffstat (limited to 'crates/ra_syntax/src/ast')
-rw-r--r-- | crates/ra_syntax/src/ast/generated.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/src/ast/traits.rs | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index e373b3fa4..89d3a35c5 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs | |||
@@ -4039,6 +4039,7 @@ impl ToOwned for TypeParam { | |||
4039 | impl ast::NameOwner for TypeParam {} | 4039 | impl ast::NameOwner for TypeParam {} |
4040 | impl ast::AttrsOwner for TypeParam {} | 4040 | impl ast::AttrsOwner for TypeParam {} |
4041 | impl ast::TypeBoundsOwner for TypeParam {} | 4041 | impl ast::TypeBoundsOwner for TypeParam {} |
4042 | impl ast::DefaultTypeParamOwner for TypeParam {} | ||
4042 | impl TypeParam {} | 4043 | impl TypeParam {} |
4043 | 4044 | ||
4044 | // TypeParamList | 4045 | // TypeParamList |
diff --git a/crates/ra_syntax/src/ast/traits.rs b/crates/ra_syntax/src/ast/traits.rs index aaf07d731..1c90cf148 100644 --- a/crates/ra_syntax/src/ast/traits.rs +++ b/crates/ra_syntax/src/ast/traits.rs | |||
@@ -152,3 +152,9 @@ impl<'a> Iterator for CommentIter<'a> { | |||
152 | self.iter.by_ref().find_map(|el| el.as_token().and_then(ast::Comment::cast)) | 152 | self.iter.by_ref().find_map(|el| el.as_token().and_then(ast::Comment::cast)) |
153 | } | 153 | } |
154 | } | 154 | } |
155 | |||
156 | pub trait DefaultTypeParamOwner: AstNode { | ||
157 | fn default_type(&self) -> Option<&ast::PathType> { | ||
158 | child_opt(self) | ||
159 | } | ||
160 | } | ||