diff options
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r-- | crates/ra_syntax/src/ast/generated/nodes.rs | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index b2d108a7c..04a4d354c 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs | |||
@@ -1376,15 +1376,15 @@ impl ast::AttrsOwner for ExternItem {} | |||
1376 | impl ast::NameOwner for ExternItem {} | 1376 | impl ast::NameOwner for ExternItem {} |
1377 | impl ast::VisibilityOwner for ExternItem {} | 1377 | impl ast::VisibilityOwner for ExternItem {} |
1378 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 1378 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
1379 | pub enum NominalDef { | 1379 | pub enum AdtDef { |
1380 | StructDef(StructDef), | 1380 | StructDef(StructDef), |
1381 | EnumDef(EnumDef), | 1381 | EnumDef(EnumDef), |
1382 | UnionDef(UnionDef), | 1382 | UnionDef(UnionDef), |
1383 | } | 1383 | } |
1384 | impl ast::AttrsOwner for NominalDef {} | 1384 | impl ast::AttrsOwner for AdtDef {} |
1385 | impl ast::NameOwner for NominalDef {} | 1385 | impl ast::NameOwner for AdtDef {} |
1386 | impl ast::TypeParamsOwner for NominalDef {} | 1386 | impl ast::TypeParamsOwner for AdtDef {} |
1387 | impl ast::VisibilityOwner for NominalDef {} | 1387 | impl ast::VisibilityOwner for AdtDef {} |
1388 | impl AstNode for SourceFile { | 1388 | impl AstNode for SourceFile { |
1389 | fn can_cast(kind: SyntaxKind) -> bool { kind == SOURCE_FILE } | 1389 | fn can_cast(kind: SyntaxKind) -> bool { kind == SOURCE_FILE } |
1390 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1390 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -3345,16 +3345,16 @@ impl AstNode for ExternItem { | |||
3345 | } | 3345 | } |
3346 | } | 3346 | } |
3347 | } | 3347 | } |
3348 | impl From<StructDef> for NominalDef { | 3348 | impl From<StructDef> for AdtDef { |
3349 | fn from(node: StructDef) -> NominalDef { NominalDef::StructDef(node) } | 3349 | fn from(node: StructDef) -> AdtDef { AdtDef::StructDef(node) } |
3350 | } | 3350 | } |
3351 | impl From<EnumDef> for NominalDef { | 3351 | impl From<EnumDef> for AdtDef { |
3352 | fn from(node: EnumDef) -> NominalDef { NominalDef::EnumDef(node) } | 3352 | fn from(node: EnumDef) -> AdtDef { AdtDef::EnumDef(node) } |
3353 | } | 3353 | } |
3354 | impl From<UnionDef> for NominalDef { | 3354 | impl From<UnionDef> for AdtDef { |
3355 | fn from(node: UnionDef) -> NominalDef { NominalDef::UnionDef(node) } | 3355 | fn from(node: UnionDef) -> AdtDef { AdtDef::UnionDef(node) } |
3356 | } | 3356 | } |
3357 | impl AstNode for NominalDef { | 3357 | impl AstNode for AdtDef { |
3358 | fn can_cast(kind: SyntaxKind) -> bool { | 3358 | fn can_cast(kind: SyntaxKind) -> bool { |
3359 | match kind { | 3359 | match kind { |
3360 | STRUCT_DEF | ENUM_DEF | UNION_DEF => true, | 3360 | STRUCT_DEF | ENUM_DEF | UNION_DEF => true, |
@@ -3363,18 +3363,18 @@ impl AstNode for NominalDef { | |||
3363 | } | 3363 | } |
3364 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 3364 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
3365 | let res = match syntax.kind() { | 3365 | let res = match syntax.kind() { |
3366 | STRUCT_DEF => NominalDef::StructDef(StructDef { syntax }), | 3366 | STRUCT_DEF => AdtDef::StructDef(StructDef { syntax }), |
3367 | ENUM_DEF => NominalDef::EnumDef(EnumDef { syntax }), | 3367 | ENUM_DEF => AdtDef::EnumDef(EnumDef { syntax }), |
3368 | UNION_DEF => NominalDef::UnionDef(UnionDef { syntax }), | 3368 | UNION_DEF => AdtDef::UnionDef(UnionDef { syntax }), |
3369 | _ => return None, | 3369 | _ => return None, |
3370 | }; | 3370 | }; |
3371 | Some(res) | 3371 | Some(res) |
3372 | } | 3372 | } |
3373 | fn syntax(&self) -> &SyntaxNode { | 3373 | fn syntax(&self) -> &SyntaxNode { |
3374 | match self { | 3374 | match self { |
3375 | NominalDef::StructDef(it) => &it.syntax, | 3375 | AdtDef::StructDef(it) => &it.syntax, |
3376 | NominalDef::EnumDef(it) => &it.syntax, | 3376 | AdtDef::EnumDef(it) => &it.syntax, |
3377 | NominalDef::UnionDef(it) => &it.syntax, | 3377 | AdtDef::UnionDef(it) => &it.syntax, |
3378 | } | 3378 | } |
3379 | } | 3379 | } |
3380 | } | 3380 | } |
@@ -3423,7 +3423,7 @@ impl std::fmt::Display for ExternItem { | |||
3423 | std::fmt::Display::fmt(self.syntax(), f) | 3423 | std::fmt::Display::fmt(self.syntax(), f) |
3424 | } | 3424 | } |
3425 | } | 3425 | } |
3426 | impl std::fmt::Display for NominalDef { | 3426 | impl std::fmt::Display for AdtDef { |
3427 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3427 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3428 | std::fmt::Display::fmt(self.syntax(), f) | 3428 | std::fmt::Display::fmt(self.syntax(), f) |
3429 | } | 3429 | } |