diff options
Diffstat (limited to 'crates/ra_syntax/src/ast')
-rw-r--r-- | crates/ra_syntax/src/ast/extensions.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/ast/generated.rs | 28 |
2 files changed, 15 insertions, 15 deletions
diff --git a/crates/ra_syntax/src/ast/extensions.rs b/crates/ra_syntax/src/ast/extensions.rs index 44de4af89..d5986e8b4 100644 --- a/crates/ra_syntax/src/ast/extensions.rs +++ b/crates/ra_syntax/src/ast/extensions.rs | |||
@@ -169,7 +169,7 @@ impl ast::UseTreeList { | |||
169 | } | 169 | } |
170 | } | 170 | } |
171 | 171 | ||
172 | impl ast::ImplBlock { | 172 | impl ast::ImplDef { |
173 | pub fn target_type(&self) -> Option<ast::TypeRef> { | 173 | pub fn target_type(&self) -> Option<ast::TypeRef> { |
174 | match self.target() { | 174 | match self.target() { |
175 | (Some(t), None) | (_, Some(t)) => Some(t), | 175 | (Some(t), None) | (_, Some(t)) => Some(t), |
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index 8eb240801..150893e39 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs | |||
@@ -552,13 +552,13 @@ impl TypeAliasDef { | |||
552 | } | 552 | } |
553 | } | 553 | } |
554 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 554 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
555 | pub struct ImplBlock { | 555 | pub struct ImplDef { |
556 | pub(crate) syntax: SyntaxNode, | 556 | pub(crate) syntax: SyntaxNode, |
557 | } | 557 | } |
558 | impl AstNode for ImplBlock { | 558 | impl AstNode for ImplDef { |
559 | fn can_cast(kind: SyntaxKind) -> bool { | 559 | fn can_cast(kind: SyntaxKind) -> bool { |
560 | match kind { | 560 | match kind { |
561 | IMPL_BLOCK => true, | 561 | IMPL_DEF => true, |
562 | _ => false, | 562 | _ => false, |
563 | } | 563 | } |
564 | } | 564 | } |
@@ -573,9 +573,9 @@ impl AstNode for ImplBlock { | |||
573 | &self.syntax | 573 | &self.syntax |
574 | } | 574 | } |
575 | } | 575 | } |
576 | impl ast::TypeParamsOwner for ImplBlock {} | 576 | impl ast::TypeParamsOwner for ImplDef {} |
577 | impl ast::AttrsOwner for ImplBlock {} | 577 | impl ast::AttrsOwner for ImplDef {} |
578 | impl ImplBlock { | 578 | impl ImplDef { |
579 | pub fn item_list(&self) -> Option<ItemList> { | 579 | pub fn item_list(&self) -> Option<ItemList> { |
580 | AstChildren::new(&self.syntax).next() | 580 | AstChildren::new(&self.syntax).next() |
581 | } | 581 | } |
@@ -3524,7 +3524,7 @@ pub enum ModuleItem { | |||
3524 | FnDef(FnDef), | 3524 | FnDef(FnDef), |
3525 | TraitDef(TraitDef), | 3525 | TraitDef(TraitDef), |
3526 | TypeAliasDef(TypeAliasDef), | 3526 | TypeAliasDef(TypeAliasDef), |
3527 | ImplBlock(ImplBlock), | 3527 | ImplDef(ImplDef), |
3528 | UseItem(UseItem), | 3528 | UseItem(UseItem), |
3529 | ExternCrateItem(ExternCrateItem), | 3529 | ExternCrateItem(ExternCrateItem), |
3530 | ConstDef(ConstDef), | 3530 | ConstDef(ConstDef), |
@@ -3561,9 +3561,9 @@ impl From<TypeAliasDef> for ModuleItem { | |||
3561 | ModuleItem::TypeAliasDef(node) | 3561 | ModuleItem::TypeAliasDef(node) |
3562 | } | 3562 | } |
3563 | } | 3563 | } |
3564 | impl From<ImplBlock> for ModuleItem { | 3564 | impl From<ImplDef> for ModuleItem { |
3565 | fn from(node: ImplBlock) -> ModuleItem { | 3565 | fn from(node: ImplDef) -> ModuleItem { |
3566 | ModuleItem::ImplBlock(node) | 3566 | ModuleItem::ImplDef(node) |
3567 | } | 3567 | } |
3568 | } | 3568 | } |
3569 | impl From<UseItem> for ModuleItem { | 3569 | impl From<UseItem> for ModuleItem { |
@@ -3594,8 +3594,8 @@ impl From<Module> for ModuleItem { | |||
3594 | impl AstNode for ModuleItem { | 3594 | impl AstNode for ModuleItem { |
3595 | fn can_cast(kind: SyntaxKind) -> bool { | 3595 | fn can_cast(kind: SyntaxKind) -> bool { |
3596 | match kind { | 3596 | match kind { |
3597 | STRUCT_DEF | UNION_DEF | ENUM_DEF | FN_DEF | TRAIT_DEF | TYPE_ALIAS_DEF | 3597 | STRUCT_DEF | UNION_DEF | ENUM_DEF | FN_DEF | TRAIT_DEF | TYPE_ALIAS_DEF | IMPL_DEF |
3598 | | IMPL_BLOCK | USE_ITEM | EXTERN_CRATE_ITEM | CONST_DEF | STATIC_DEF | MODULE => true, | 3598 | | USE_ITEM | EXTERN_CRATE_ITEM | CONST_DEF | STATIC_DEF | MODULE => true, |
3599 | _ => false, | 3599 | _ => false, |
3600 | } | 3600 | } |
3601 | } | 3601 | } |
@@ -3607,7 +3607,7 @@ impl AstNode for ModuleItem { | |||
3607 | FN_DEF => ModuleItem::FnDef(FnDef { syntax }), | 3607 | FN_DEF => ModuleItem::FnDef(FnDef { syntax }), |
3608 | TRAIT_DEF => ModuleItem::TraitDef(TraitDef { syntax }), | 3608 | TRAIT_DEF => ModuleItem::TraitDef(TraitDef { syntax }), |
3609 | TYPE_ALIAS_DEF => ModuleItem::TypeAliasDef(TypeAliasDef { syntax }), | 3609 | TYPE_ALIAS_DEF => ModuleItem::TypeAliasDef(TypeAliasDef { syntax }), |
3610 | IMPL_BLOCK => ModuleItem::ImplBlock(ImplBlock { syntax }), | 3610 | IMPL_DEF => ModuleItem::ImplDef(ImplDef { syntax }), |
3611 | USE_ITEM => ModuleItem::UseItem(UseItem { syntax }), | 3611 | USE_ITEM => ModuleItem::UseItem(UseItem { syntax }), |
3612 | EXTERN_CRATE_ITEM => ModuleItem::ExternCrateItem(ExternCrateItem { syntax }), | 3612 | EXTERN_CRATE_ITEM => ModuleItem::ExternCrateItem(ExternCrateItem { syntax }), |
3613 | CONST_DEF => ModuleItem::ConstDef(ConstDef { syntax }), | 3613 | CONST_DEF => ModuleItem::ConstDef(ConstDef { syntax }), |
@@ -3625,7 +3625,7 @@ impl AstNode for ModuleItem { | |||
3625 | ModuleItem::FnDef(it) => &it.syntax, | 3625 | ModuleItem::FnDef(it) => &it.syntax, |
3626 | ModuleItem::TraitDef(it) => &it.syntax, | 3626 | ModuleItem::TraitDef(it) => &it.syntax, |
3627 | ModuleItem::TypeAliasDef(it) => &it.syntax, | 3627 | ModuleItem::TypeAliasDef(it) => &it.syntax, |
3628 | ModuleItem::ImplBlock(it) => &it.syntax, | 3628 | ModuleItem::ImplDef(it) => &it.syntax, |
3629 | ModuleItem::UseItem(it) => &it.syntax, | 3629 | ModuleItem::UseItem(it) => &it.syntax, |
3630 | ModuleItem::ExternCrateItem(it) => &it.syntax, | 3630 | ModuleItem::ExternCrateItem(it) => &it.syntax, |
3631 | ModuleItem::ConstDef(it) => &it.syntax, | 3631 | ModuleItem::ConstDef(it) => &it.syntax, |