Add trait ast::TypeBoundsOwner

This commit is contained in:
Ville Penttinen 2019-03-31 10:56:48 +03:00
parent 245c0d8584
commit 55dcdb7d09
3 changed files with 21 additions and 5 deletions

View file

@ -110,6 +110,12 @@ pub trait TypeParamsOwner: AstNode {
}
}
pub trait TypeBoundsOwner: AstNode {
fn type_bound_list(&self) -> Option<&TypeBoundList> {
child_opt(self)
}
}
pub trait AttrsOwner: AstNode {
fn attrs(&self) -> AstChildren<Attr> {
children(self)