about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-07-30 15:51:06 +0000
committerGitHub <noreply@github.com>2020-07-30 15:51:06 +0000
commit97df465391f50521c5102474d7e0ee2ea61ef48e (patch)
tree2bda021d9fafc6af927ebfbcafd31537496bd53c
parent0c8944314cb323416c8ad6ad27347ca056c5a91c (diff)
parent216a5344c8ef3c3e430d2761dc8b1a7b60250a15 (diff)
downloadrust-97df465391f50521c5102474d7e0ee2ea61ef48e.tar.gz
rust-97df465391f50521c5102474d7e0ee2ea61ef48e.zip
Merge #5602
5602: Rename StructDef -> Struct r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
-rw-r--r--crates/ra_assists/src/handlers/change_visibility.rs4
-rw-r--r--crates/ra_assists/src/handlers/generate_new.rs6
-rw-r--r--crates/ra_assists/src/handlers/move_bounds.rs2
-rw-r--r--crates/ra_hir/src/has_source.rs4
-rw-r--r--crates/ra_hir/src/semantics.rs2
-rw-r--r--crates/ra_hir/src/semantics/source_to_def.rs6
-rw-r--r--crates/ra_hir_def/src/body/lower.rs2
-rw-r--r--crates/ra_hir_def/src/item_tree.rs4
-rw-r--r--crates/ra_hir_def/src/item_tree/lower.rs6
-rw-r--r--crates/ra_hir_def/src/item_tree/tests.rs6
-rw-r--r--crates/ra_hir_def/src/keys.rs2
-rw-r--r--crates/ra_hir_expand/src/builtin_derive.rs2
-rw-r--r--crates/ra_ide/src/display/navigation_target.rs4
-rw-r--r--crates/ra_ide/src/display/short_label.rs2
-rw-r--r--crates/ra_ide/src/file_structure.rs4
-rw-r--r--crates/ra_ide/src/goto_implementation.rs2
-rw-r--r--crates/ra_ide/src/hover.rs34
-rw-r--r--crates/ra_ide/src/references.rs16
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs2
-rw-r--r--crates/ra_ide_db/src/defs.rs2
-rw-r--r--crates/ra_ide_db/src/symbol_index.rs4
-rw-r--r--crates/ra_mbe/src/syntax_bridge.rs2
-rw-r--r--crates/ra_mbe/src/tests.rs4
-rw-r--r--crates/ra_parser/src/grammar/items/adt.rs2
-rw-r--r--crates/ra_parser/src/syntax_kind/generated.rs4
-rw-r--r--crates/ra_syntax/src/ast.rs2
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs42
-rw-r--r--crates/ra_syntax/src/ast/node_ext.rs4
-rw-r--r--crates/ra_syntax/src/parsing/text_tree_sink.rs4
-rw-r--r--crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/err/0011_extern_struct.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0013_invalid_type.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0022_crate_visibility.rast8
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.rast10
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0090_type_param_default.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0147_const_param.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0001_struct_item.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0008_mod_item.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.rast10
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.rast30
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0020_type_param_bounds.rast20
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast2
-rw-r--r--crates/rust-analyzer/src/handlers.rs2
-rw-r--r--crates/rust-analyzer/src/to_proto.rs2
-rw-r--r--xtask/src/ast_src.rs2
-rw-r--r--xtask/src/codegen/gen_syntax.rs2
-rw-r--r--xtask/src/codegen/rust.ungram6
63 files changed, 163 insertions, 163 deletions
diff --git a/crates/ra_assists/src/handlers/change_visibility.rs b/crates/ra_assists/src/handlers/change_visibility.rs
index 72d06d55b73..12c40a3cc50 100644
--- a/crates/ra_assists/src/handlers/change_visibility.rs
+++ b/crates/ra_assists/src/handlers/change_visibility.rs
@@ -1,7 +1,7 @@
 use ra_syntax::{
     ast::{self, NameOwner, VisibilityOwner},
     AstNode,
-    SyntaxKind::{CONST_DEF, ENUM_DEF, FN, MODULE, STATIC_DEF, STRUCT_DEF, TRAIT_DEF, VISIBILITY},
+    SyntaxKind::{CONST_DEF, ENUM_DEF, FN, MODULE, STATIC_DEF, STRUCT, TRAIT_DEF, VISIBILITY},
     T,
 };
 use test_utils::mark;
@@ -36,7 +36,7 @@ fn add_vis(acc: &mut Assists, ctx: &AssistContext) -> Option<()> {
 
     let (offset, target) = if let Some(keyword) = item_keyword {
         let parent = keyword.parent();
-        let def_kws = vec![CONST_DEF, STATIC_DEF, FN, MODULE, STRUCT_DEF, ENUM_DEF, TRAIT_DEF];
+        let def_kws = vec![CONST_DEF, STATIC_DEF, FN, MODULE, STRUCT, ENUM_DEF, TRAIT_DEF];
         // Parent is not a definition, can't add visibility
         if !def_kws.iter().any(|&def_kw| def_kw == parent.kind()) {
             return None;
diff --git a/crates/ra_assists/src/handlers/generate_new.rs b/crates/ra_assists/src/handlers/generate_new.rs
index 340f9b10396..22b47d25473 100644
--- a/crates/ra_assists/src/handlers/generate_new.rs
+++ b/crates/ra_assists/src/handlers/generate_new.rs
@@ -31,7 +31,7 @@ use crate::{AssistContext, AssistId, AssistKind, Assists};
 //
 // ```
 pub(crate) fn generate_new(acc: &mut Assists, ctx: &AssistContext) -> Option<()> {
-    let strukt = ctx.find_node_at_offset::<ast::StructDef>()?;
+    let strukt = ctx.find_node_at_offset::<ast::Struct>()?;
 
     // We want to only apply this to non-union structs with named fields
     let field_list = match strukt.kind() {
@@ -91,7 +91,7 @@ pub(crate) fn generate_new(acc: &mut Assists, ctx: &AssistContext) -> Option<()>
 
 // Generates the surrounding `impl Type { <code> }` including type and lifetime
 // parameters
-fn generate_impl_text(strukt: &ast::StructDef, code: &str) -> String {
+fn generate_impl_text(strukt: &ast::Struct, code: &str) -> String {
     let type_params = strukt.generic_param_list();
     let mut buf = String::with_capacity(code.len());
     buf.push_str("\n\nimpl");
@@ -122,7 +122,7 @@ fn generate_impl_text(strukt: &ast::StructDef, code: &str) -> String {
 //
 // FIXME: change the new fn checking to a more semantic approach when that's more
 // viable (e.g. we process proc macros, etc)
-fn find_struct_impl(ctx: &AssistContext, strukt: &ast::StructDef) -> Option<Option<ast::ImplDef>> {
+fn find_struct_impl(ctx: &AssistContext, strukt: &ast::Struct) -> Option<Option<ast::ImplDef>> {
     let db = ctx.db();
     let module = strukt.syntax().ancestors().find(|node| {
         ast::Module::can_cast(node.kind()) || ast::SourceFile::can_cast(node.kind())
diff --git a/crates/ra_assists/src/handlers/move_bounds.rs b/crates/ra_assists/src/handlers/move_bounds.rs
index 15327facb4b..3b82477c503 100644
--- a/crates/ra_assists/src/handlers/move_bounds.rs
+++ b/crates/ra_assists/src/handlers/move_bounds.rs
@@ -41,7 +41,7 @@ pub(crate) fn move_bounds_to_where_clause(acc: &mut Assists, ctx: &AssistContext
             ast::TraitDef(it) => it.assoc_item_list()?.syntax().clone().into(),
             ast::ImplDef(it) => it.assoc_item_list()?.syntax().clone().into(),
             ast::EnumDef(it) => it.variant_list()?.syntax().clone().into(),
-            ast::StructDef(it) => {
+            ast::Struct(it) => {
                 it.syntax().children_with_tokens()
                     .find(|it| it.kind() == RECORD_FIELD_LIST || it.kind() == T![;])?
             },
diff --git a/crates/ra_hir/src/has_source.rs b/crates/ra_hir/src/has_source.rs
index 3a3d821090a..811a12e0056 100644
--- a/crates/ra_hir/src/has_source.rs
+++ b/crates/ra_hir/src/has_source.rs
@@ -57,8 +57,8 @@ impl HasSource for Field {
     }
 }
 impl HasSource for Struct {
-    type Ast = ast::StructDef;
-    fn source(self, db: &dyn HirDatabase) -> InFile<ast::StructDef> {
+    type Ast = ast::Struct;
+    fn source(self, db: &dyn HirDatabase) -> InFile<ast::Struct> {
         self.id.lookup(db.upcast()).source(db.upcast())
     }
 }
diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs
index 6c877540295..7df018b0594 100644
--- a/crates/ra_hir/src/semantics.rs
+++ b/crates/ra_hir/src/semantics.rs
@@ -580,7 +580,7 @@ macro_rules! to_def_impls {
 
 to_def_impls![
     (crate::Module, ast::Module, module_to_def),
-    (crate::Struct, ast::StructDef, struct_to_def),
+    (crate::Struct, ast::Struct, struct_to_def),
     (crate::Enum, ast::EnumDef, enum_to_def),
     (crate::Union, ast::Union, union_to_def),
     (crate::Trait, ast::TraitDef, trait_to_def),
diff --git a/crates/ra_hir/src/semantics/source_to_def.rs b/crates/ra_hir/src/semantics/source_to_def.rs
index 0093a86719e..75b773352fc 100644
--- a/crates/ra_hir/src/semantics/source_to_def.rs
+++ b/crates/ra_hir/src/semantics/source_to_def.rs
@@ -74,7 +74,7 @@ impl SourceToDefCtx<'_, '_> {
     pub(super) fn fn_to_def(&mut self, src: InFile<ast::Fn>) -> Option<FunctionId> {
         self.to_def(src, keys::FUNCTION)
     }
-    pub(super) fn struct_to_def(&mut self, src: InFile<ast::StructDef>) -> Option<StructId> {
+    pub(super) fn struct_to_def(&mut self, src: InFile<ast::Struct>) -> Option<StructId> {
         self.to_def(src, keys::STRUCT)
     }
     pub(super) fn enum_to_def(&mut self, src: InFile<ast::EnumDef>) -> Option<EnumId> {
@@ -166,7 +166,7 @@ impl SourceToDefCtx<'_, '_> {
                         let def = self.fn_to_def(container.with_value(it))?;
                         DefWithBodyId::from(def).into()
                     },
-                    ast::StructDef(it) => {
+                    ast::Struct(it) => {
                         let def = self.struct_to_def(container.with_value(it))?;
                         VariantId::from(def).into()
                     },
@@ -205,7 +205,7 @@ impl SourceToDefCtx<'_, '_> {
             let res: GenericDefId = match_ast! {
                 match (container.value) {
                     ast::Fn(it) => self.fn_to_def(container.with_value(it))?.into(),
-                    ast::StructDef(it) => self.struct_to_def(container.with_value(it))?.into(),
+                    ast::Struct(it) => self.struct_to_def(container.with_value(it))?.into(),
                     ast::EnumDef(it) => self.enum_to_def(container.with_value(it))?.into(),
                     ast::TraitDef(it) => self.trait_to_def(container.with_value(it))?.into(),
                     ast::TypeAlias(it) => self.type_alias_to_def(container.with_value(it))?.into(),
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs
index d8963f63f3d..840841d875f 100644
--- a/crates/ra_hir_def/src/body/lower.rs
+++ b/crates/ra_hir_def/src/body/lower.rs
@@ -652,7 +652,7 @@ impl ExprCollector<'_> {
                         let id = self.find_inner_item(&def)?;
                         (StaticLoc { container, id }.intern(self.db).into(), def.name())
                     }
-                    ast::Item::StructDef(def) => {
+                    ast::Item::Struct(def) => {
                         let id = self.find_inner_item(&def)?;
                         (StructLoc { container, id }.intern(self.db).into(), def.name())
                     }
diff --git a/crates/ra_hir_def/src/item_tree.rs b/crates/ra_hir_def/src/item_tree.rs
index 7bcc13b06fc..6b96a4c200e 100644
--- a/crates/ra_hir_def/src/item_tree.rs
+++ b/crates/ra_hir_def/src/item_tree.rs
@@ -414,7 +414,7 @@ mod_items! {
     Import in imports -> ast::Use,
     ExternCrate in extern_crates -> ast::ExternCrate,
     Function in functions -> ast::Fn,
-    Struct in structs -> ast::StructDef,
+    Struct in structs -> ast::Struct,
     Union in unions -> ast::Union,
     Enum in enums -> ast::EnumDef,
     Const in consts -> ast::ConstDef,
@@ -514,7 +514,7 @@ pub struct Struct {
     pub visibility: RawVisibilityId,
     pub generic_params: GenericParamsId,
     pub fields: Fields,
-    pub ast_id: FileAstId<ast::StructDef>,
+    pub ast_id: FileAstId<ast::Struct>,
     pub kind: StructDefKind,
 }
 
diff --git a/crates/ra_hir_def/src/item_tree/lower.rs b/crates/ra_hir_def/src/item_tree/lower.rs
index 2721a02a5dd..a8561801556 100644
--- a/crates/ra_hir_def/src/item_tree/lower.rs
+++ b/crates/ra_hir_def/src/item_tree/lower.rs
@@ -78,7 +78,7 @@ impl Ctx {
 
         // Collect inner items for 1-to-1-lowered items.
         match item {
-            ast::Item::StructDef(_)
+            ast::Item::Struct(_)
             | ast::Item::Union(_)
             | ast::Item::EnumDef(_)
             | ast::Item::Fn(_)
@@ -103,7 +103,7 @@ impl Ctx {
 
         let attrs = Attrs::new(item, &self.hygiene);
         let items = match item {
-            ast::Item::StructDef(ast) => self.lower_struct(ast).map(Into::into),
+            ast::Item::Struct(ast) => self.lower_struct(ast).map(Into::into),
             ast::Item::Union(ast) => self.lower_union(ast).map(Into::into),
             ast::Item::EnumDef(ast) => self.lower_enum(ast).map(Into::into),
             ast::Item::Fn(ast) => self.lower_function(ast).map(Into::into),
@@ -165,7 +165,7 @@ impl Ctx {
         }
     }
 
-    fn lower_struct(&mut self, strukt: &ast::StructDef) -> Option<FileItemTreeId<Struct>> {
+    fn lower_struct(&mut self, strukt: &ast::Struct) -> Option<FileItemTreeId<Struct>> {
         let visibility = self.lower_visibility(strukt);
         let name = strukt.name()?.as_name();
         let generic_params = self.lower_generic_params(GenericsOwner::Struct, strukt);
diff --git a/crates/ra_hir_def/src/item_tree/tests.rs b/crates/ra_hir_def/src/item_tree/tests.rs
index 0be0219486f..db37223dac5 100644
--- a/crates/ra_hir_def/src/item_tree/tests.rs
+++ b/crates/ra_hir_def/src/item_tree/tests.rs
@@ -244,11 +244,11 @@ fn smoke() {
             > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("assoc_dfl_method"))] }, input: None }]) }]
             > Function { name: Name(Text("dfl_method")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), has_self_param: true, is_unsafe: false, params: [Reference(Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Self"))] }, generic_args: [None] }), Mut)], is_varargs: false, ret_type: Tuple([]), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::Fn>(11) }
             #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("struct0"))] }, input: None }]) }]
-            Struct { name: Name(Text("Struct0")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(1), fields: Unit, ast_id: FileAstId::<ra_syntax::ast::generated::nodes::StructDef>(3), kind: Unit }
+            Struct { name: Name(Text("Struct0")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(1), fields: Unit, ast_id: FileAstId::<ra_syntax::ast::generated::nodes::Struct>(3), kind: Unit }
             #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("struct1"))] }, input: None }]) }]
-            Struct { name: Name(Text("Struct1")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(2), fields: Tuple(IdRange::<ra_hir_def::item_tree::Field>(0..1)), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::StructDef>(4), kind: Tuple }
+            Struct { name: Name(Text("Struct1")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(2), fields: Tuple(IdRange::<ra_hir_def::item_tree::Field>(0..1)), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::Struct>(4), kind: Tuple }
             #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("struct2"))] }, input: None }]) }]
-            Struct { name: Name(Text("Struct2")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(3), fields: Record(IdRange::<ra_hir_def::item_tree::Field>(1..2)), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::StructDef>(5), kind: Record }
+            Struct { name: Name(Text("Struct2")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(3), fields: Record(IdRange::<ra_hir_def::item_tree::Field>(1..2)), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::Struct>(5), kind: Record }
             #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("en"))] }, input: None }]) }]
             Enum { name: Name(Text("En")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), variants: IdRange::<ra_hir_def::item_tree::Variant>(0..1), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::EnumDef>(6) }
             #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("un"))] }, input: None }]) }]
diff --git a/crates/ra_hir_def/src/keys.rs b/crates/ra_hir_def/src/keys.rs
index 2282aed14d5..d9ec0f30566 100644
--- a/crates/ra_hir_def/src/keys.rs
+++ b/crates/ra_hir_def/src/keys.rs
@@ -20,7 +20,7 @@ pub const STATIC: Key<ast::StaticDef, StaticId> = Key::new();
 pub const TYPE_ALIAS: Key<ast::TypeAlias, TypeAliasId> = Key::new();
 pub const IMPL: Key<ast::ImplDef, ImplId> = Key::new();
 pub const TRAIT: Key<ast::TraitDef, TraitId> = Key::new();
-pub const STRUCT: Key<ast::StructDef, StructId> = Key::new();
+pub const STRUCT: Key<ast::Struct, StructId> = Key::new();
 pub const UNION: Key<ast::Union, UnionId> = Key::new();
 pub const ENUM: Key<ast::EnumDef, EnumId> = Key::new();
 
diff --git a/crates/ra_hir_expand/src/builtin_derive.rs b/crates/ra_hir_expand/src/builtin_derive.rs
index ef3508494af..489ec0513a8 100644
--- a/crates/ra_hir_expand/src/builtin_derive.rs
+++ b/crates/ra_hir_expand/src/builtin_derive.rs
@@ -72,7 +72,7 @@ fn parse_adt(tt: &tt::Subtree) -> Result<BasicAdtInfo, mbe::ExpandError> {
     let node = item.syntax();
     let (name, params) = match_ast! {
         match node {
-            ast::StructDef(it) => (it.name(), it.generic_param_list()),
+            ast::Struct(it) => (it.name(), it.generic_param_list()),
             ast::EnumDef(it) => (it.name(), it.generic_param_list()),
             ast::Union(it) => (it.name(), it.generic_param_list()),
             _ => {
diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs
index 797d2d8e3d9..5686faaabc7 100644
--- a/crates/ra_ide/src/display/navigation_target.rs
+++ b/crates/ra_ide/src/display/navigation_target.rs
@@ -380,7 +380,7 @@ pub(crate) fn docs_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option
     match_ast! {
         match node {
             ast::Fn(it) => it.doc_comment_text(),
-            ast::StructDef(it) => it.doc_comment_text(),
+            ast::Struct(it) => it.doc_comment_text(),
             ast::EnumDef(it) => it.doc_comment_text(),
             ast::TraitDef(it) => it.doc_comment_text(),
             ast::Module(it) => it.doc_comment_text(),
@@ -405,7 +405,7 @@ pub(crate) fn description_from_symbol(db: &RootDatabase, symbol: &FileSymbol) ->
     match_ast! {
         match node {
             ast::Fn(it) => it.short_label(),
-            ast::StructDef(it) => it.short_label(),
+            ast::Struct(it) => it.short_label(),
             ast::EnumDef(it) => it.short_label(),
             ast::TraitDef(it) => it.short_label(),
             ast::Module(it) => it.short_label(),
diff --git a/crates/ra_ide/src/display/short_label.rs b/crates/ra_ide/src/display/short_label.rs
index 730df1414f0..504b884c58a 100644
--- a/crates/ra_ide/src/display/short_label.rs
+++ b/crates/ra_ide/src/display/short_label.rs
@@ -13,7 +13,7 @@ impl ShortLabel for ast::Fn {
     }
 }
 
-impl ShortLabel for ast::StructDef {
+impl ShortLabel for ast::Struct {
     fn short_label(&self) -> Option<String> {
         short_label_from_node(self, "struct ")
     }
diff --git a/crates/ra_ide/src/file_structure.rs b/crates/ra_ide/src/file_structure.rs
index 874cf72ef3b..6f198fcbc67 100644
--- a/crates/ra_ide/src/file_structure.rs
+++ b/crates/ra_ide/src/file_structure.rs
@@ -126,7 +126,7 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> {
 
                 decl_with_detail(it, Some(detail))
             },
-            ast::StructDef(it) => decl(it),
+            ast::Struct(it) => decl(it),
             ast::Union(it) => decl(it),
             ast::EnumDef(it) => decl(it),
             ast::EnumVariant(it) => decl(it),
@@ -238,7 +238,7 @@ fn very_obsolete() {}
                         label: "Foo",
                         navigation_range: 8..11,
                         node_range: 1..26,
-                        kind: STRUCT_DEF,
+                        kind: STRUCT,
                         detail: None,
                         deprecated: false,
                     },
diff --git a/crates/ra_ide/src/goto_implementation.rs b/crates/ra_ide/src/goto_implementation.rs
index e41a4a12b51..699fad57d17 100644
--- a/crates/ra_ide/src/goto_implementation.rs
+++ b/crates/ra_ide/src/goto_implementation.rs
@@ -44,7 +44,7 @@ fn impls_for_def(
     krate: Crate,
 ) -> Option<Vec<NavigationTarget>> {
     let ty = match node {
-        ast::AdtDef::StructDef(def) => sema.to_def(def)?.ty(sema.db),
+        ast::AdtDef::Struct(def) => sema.to_def(def)?.ty(sema.db),
         ast::AdtDef::EnumDef(def) => sema.to_def(def)?.ty(sema.db),
         ast::AdtDef::Union(def) => sema.to_def(def)?.ty(sema.db),
     };
diff --git a/crates/ra_ide/src/hover.rs b/crates/ra_ide/src/hover.rs
index 4ef7efd26d9..83228af2e92 100644
--- a/crates/ra_ide/src/hover.rs
+++ b/crates/ra_ide/src/hover.rs
@@ -1443,7 +1443,7 @@ fn main() { let s<|>t = S{ f1:0 }; }
                                         7..8,
                                     ),
                                     name: "S",
-                                    kind: STRUCT_DEF,
+                                    kind: STRUCT,
                                     container_name: None,
                                     description: Some(
                                         "struct S",
@@ -1482,7 +1482,7 @@ fn main() { let s<|>t = S{ f1:Arg(0) }; }
                                         24..25,
                                     ),
                                     name: "S",
-                                    kind: STRUCT_DEF,
+                                    kind: STRUCT,
                                     container_name: None,
                                     description: Some(
                                         "struct S",
@@ -1501,7 +1501,7 @@ fn main() { let s<|>t = S{ f1:Arg(0) }; }
                                         7..10,
                                     ),
                                     name: "Arg",
-                                    kind: STRUCT_DEF,
+                                    kind: STRUCT,
                                     container_name: None,
                                     description: Some(
                                         "struct Arg",
@@ -1540,7 +1540,7 @@ fn main() { let s<|>t = S{ f1: S{ f1: Arg(0) } }; }
                                         24..25,
                                     ),
                                     name: "S",
-                                    kind: STRUCT_DEF,
+                                    kind: STRUCT,
                                     container_name: None,
                                     description: Some(
                                         "struct S",
@@ -1559,7 +1559,7 @@ fn main() { let s<|>t = S{ f1: S{ f1: Arg(0) } }; }
                                         7..10,
                                     ),
                                     name: "Arg",
-                                    kind: STRUCT_DEF,
+                                    kind: STRUCT,
                                     container_name: None,
                                     description: Some(
                                         "struct Arg",
@@ -1601,7 +1601,7 @@ fn main() { let s<|>t = (A(1), B(2), M::C(3) ); }
                                         7..8,
                                     ),
                                     name: "A",
-                                    kind: STRUCT_DEF,
+                                    kind: STRUCT,
                                     container_name: None,
                                     description: Some(
                                         "struct A",
@@ -1620,7 +1620,7 @@ fn main() { let s<|>t = (A(1), B(2), M::C(3) ); }
                                         22..23,
                                     ),
                                     name: "B",
-                                    kind: STRUCT_DEF,
+                                    kind: STRUCT,
                                     container_name: None,
                                     description: Some(
                                         "struct B",
@@ -1639,7 +1639,7 @@ fn main() { let s<|>t = (A(1), B(2), M::C(3) ); }
                                         53..54,
                                     ),
                                     name: "C",
-                                    kind: STRUCT_DEF,
+                                    kind: STRUCT,
                                     container_name: None,
                                     description: Some(
                                         "pub struct C",
@@ -1737,7 +1737,7 @@ fn main() { let s<|>t = foo(); }
                                         23..24,
                                     ),
                                     name: "S",
-                                    kind: STRUCT_DEF,
+                                    kind: STRUCT,
                                     container_name: None,
                                     description: Some(
                                         "struct S",
@@ -1877,7 +1877,7 @@ fn main() { let s<|>t = foo(); }
                                         39..41,
                                     ),
                                     name: "S1",
-                                    kind: STRUCT_DEF,
+                                    kind: STRUCT,
                                     container_name: None,
                                     description: Some(
                                         "struct S1",
@@ -1896,7 +1896,7 @@ fn main() { let s<|>t = foo(); }
                                         52..54,
                                     ),
                                     name: "S2",
-                                    kind: STRUCT_DEF,
+                                    kind: STRUCT,
                                     container_name: None,
                                     description: Some(
                                         "struct S2",
@@ -2011,7 +2011,7 @@ fn foo(ar<|>g: &impl Foo + Bar<S>) {}
                                         36..37,
                                     ),
                                     name: "S",
-                                    kind: STRUCT_DEF,
+                                    kind: STRUCT,
                                     container_name: None,
                                     description: Some(
                                         "struct S",
@@ -2068,7 +2068,7 @@ fn foo(ar<|>g: &impl Foo<S>) {}
                                         23..24,
                                     ),
                                     name: "S",
-                                    kind: STRUCT_DEF,
+                                    kind: STRUCT,
                                     container_name: None,
                                     description: Some(
                                         "struct S",
@@ -2111,7 +2111,7 @@ fn main() { let s<|>t = foo(); }
                                         49..50,
                                     ),
                                     name: "B",
-                                    kind: STRUCT_DEF,
+                                    kind: STRUCT,
                                     container_name: None,
                                     description: Some(
                                         "struct B",
@@ -2224,7 +2224,7 @@ fn foo(ar<|>g: &dyn Foo<S>) {}
                                         23..24,
                                     ),
                                     name: "S",
-                                    kind: STRUCT_DEF,
+                                    kind: STRUCT,
                                     container_name: None,
                                     description: Some(
                                         "struct S",
@@ -2284,7 +2284,7 @@ fn foo(a<|>rg: &impl ImplTrait<B<dyn DynTrait<B<S>>>>) {}
                                         50..51,
                                     ),
                                     name: "B",
-                                    kind: STRUCT_DEF,
+                                    kind: STRUCT,
                                     container_name: None,
                                     description: Some(
                                         "struct B",
@@ -2322,7 +2322,7 @@ fn foo(a<|>rg: &impl ImplTrait<B<dyn DynTrait<B<S>>>>) {}
                                         65..66,
                                     ),
                                     name: "S",
-                                    kind: STRUCT_DEF,
+                                    kind: STRUCT,
                                     container_name: None,
                                     description: Some(
                                         "struct S",
diff --git a/crates/ra_ide/src/references.rs b/crates/ra_ide/src/references.rs
index d61ac271ee4..2a62dab6cb1 100644
--- a/crates/ra_ide/src/references.rs
+++ b/crates/ra_ide/src/references.rs
@@ -172,7 +172,7 @@ fn get_struct_def_name_for_struct_literal_search(
         if let Some(name) =
             sema.find_node_at_offset_with_descend::<ast::Name>(&syntax, left.text_range().start())
         {
-            return name.syntax().ancestors().find_map(ast::StructDef::cast).and_then(|l| l.name());
+            return name.syntax().ancestors().find_map(ast::Struct::cast).and_then(|l| l.name());
         }
         if sema
             .find_node_at_offset_with_descend::<ast::GenericParamList>(
@@ -181,7 +181,7 @@ fn get_struct_def_name_for_struct_literal_search(
             )
             .is_some()
         {
-            return left.ancestors().find_map(ast::StructDef::cast).and_then(|l| l.name());
+            return left.ancestors().find_map(ast::Struct::cast).and_then(|l| l.name());
         }
     }
     None
@@ -212,7 +212,7 @@ fn main() {
         );
         check_result(
             refs,
-            "Foo STRUCT_DEF FileId(1) 0..26 7..10 Other",
+            "Foo STRUCT FileId(1) 0..26 7..10 Other",
             &["FileId(1) 101..104 StructLiteral"],
         );
     }
@@ -230,7 +230,7 @@ struct Foo<|> {}
         );
         check_result(
             refs,
-            "Foo STRUCT_DEF FileId(1) 0..13 7..10 Other",
+            "Foo STRUCT FileId(1) 0..13 7..10 Other",
             &["FileId(1) 41..44 Other", "FileId(1) 54..57 StructLiteral"],
         );
     }
@@ -248,7 +248,7 @@ struct Foo<T> <|>{}
         );
         check_result(
             refs,
-            "Foo STRUCT_DEF FileId(1) 0..16 7..10 Other",
+            "Foo STRUCT FileId(1) 0..16 7..10 Other",
             &["FileId(1) 64..67 StructLiteral"],
         );
     }
@@ -267,7 +267,7 @@ fn main() {
         );
         check_result(
             refs,
-            "Foo STRUCT_DEF FileId(1) 0..16 7..10 Other",
+            "Foo STRUCT FileId(1) 0..16 7..10 Other",
             &["FileId(1) 54..57 StructLiteral"],
         );
     }
@@ -431,7 +431,7 @@ fn f() {
         let refs = analysis.find_all_refs(pos, None).unwrap().unwrap();
         check_result(
             refs,
-            "Foo STRUCT_DEF FileId(2) 17..51 28..31 Other",
+            "Foo STRUCT FileId(2) 17..51 28..31 Other",
             &["FileId(1) 53..56 StructLiteral", "FileId(3) 79..82 StructLiteral"],
         );
     }
@@ -486,7 +486,7 @@ pub(super) struct Foo<|> {
         let refs = analysis.find_all_refs(pos, None).unwrap().unwrap();
         check_result(
             refs,
-            "Foo STRUCT_DEF FileId(3) 0..41 18..21 Other",
+            "Foo STRUCT FileId(3) 0..41 18..21 Other",
             &["FileId(2) 20..23 Other", "FileId(2) 47..50 StructLiteral"],
         );
     }
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs
index b0ab160ace9..ba1fd62427e 100644
--- a/crates/ra_ide/src/syntax_highlighting.rs
+++ b/crates/ra_ide/src/syntax_highlighting.rs
@@ -705,7 +705,7 @@ fn highlight_name_by_syntax(name: ast::Name) -> Highlight {
     };
 
     let tag = match parent.kind() {
-        STRUCT_DEF => HighlightTag::Struct,
+        STRUCT => HighlightTag::Struct,
         ENUM_DEF => HighlightTag::Enum,
         UNION => HighlightTag::Union,
         TRAIT_DEF => HighlightTag::Trait,
diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs
index 11de059583a..6a2180f6c23 100644
--- a/crates/ra_ide_db/src/defs.rs
+++ b/crates/ra_ide_db/src/defs.rs
@@ -150,7 +150,7 @@ pub fn classify_name(sema: &Semantics<RootDatabase>, name: &ast::Name) -> Option
                 let def = sema.to_def(&it)?;
                 Some(NameClass::Definition(Definition::ModuleDef(def.into())))
             },
-            ast::StructDef(it) => {
+            ast::Struct(it) => {
                 let def: hir::Struct = sema.to_def(&it)?;
                 Some(NameClass::Definition(Definition::ModuleDef(def.into())))
             },
diff --git a/crates/ra_ide_db/src/symbol_index.rs b/crates/ra_ide_db/src/symbol_index.rs
index b4e85b88e86..da19f0f33d6 100644
--- a/crates/ra_ide_db/src/symbol_index.rs
+++ b/crates/ra_ide_db/src/symbol_index.rs
@@ -344,7 +344,7 @@ impl Query {
 }
 
 fn is_type(kind: SyntaxKind) -> bool {
-    matches!(kind, STRUCT_DEF | ENUM_DEF | TRAIT_DEF | TYPE_ALIAS)
+    matches!(kind, STRUCT | ENUM_DEF | TRAIT_DEF | TYPE_ALIAS)
 }
 
 /// The actual data that is stored in the index. It should be as compact as
@@ -398,7 +398,7 @@ fn to_symbol(node: &SyntaxNode) -> Option<(SmolStr, SyntaxNodePtr, TextRange)> {
     match_ast! {
         match node {
             ast::Fn(it) => decl(it),
-            ast::StructDef(it) => decl(it),
+            ast::Struct(it) => decl(it),
             ast::EnumDef(it) => decl(it),
             ast::TraitDef(it) => decl(it),
             ast::Module(it) => decl(it),
diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/ra_mbe/src/syntax_bridge.rs
index fc4133a6753..5fc48507ff5 100644
--- a/crates/ra_mbe/src/syntax_bridge.rs
+++ b/crates/ra_mbe/src/syntax_bridge.rs
@@ -825,7 +825,7 @@ mod tests {
     #[test]
     fn test_token_tree_multi_char_punct() {
         let source_file = ast::SourceFile::parse("struct Foo { a: x::Y }").ok().unwrap();
-        let struct_def = source_file.syntax().descendants().find_map(ast::StructDef::cast).unwrap();
+        let struct_def = source_file.syntax().descendants().find_map(ast::Struct::cast).unwrap();
         let tt = ast_to_token_tree(&struct_def).unwrap().0;
         token_tree_to_syntax_node(&tt, FragmentKind::Item).unwrap();
     }
diff --git a/crates/ra_mbe/src/tests.rs b/crates/ra_mbe/src/tests.rs
index d7b198458cd..21af06e73a3 100644
--- a/crates/ra_mbe/src/tests.rs
+++ b/crates/ra_mbe/src/tests.rs
@@ -490,7 +490,7 @@ fn test_expand_to_item_list() {
         format!("{:#?}", tree).trim(),
         r#"
 MACRO_ITEMS@0..40
-  STRUCT_DEF@0..20
+  STRUCT@0..20
     STRUCT_KW@0..6 "struct"
     NAME@6..9
       IDENT@6..9 "Foo"
@@ -506,7 +506,7 @@ MACRO_ITEMS@0..40
               NAME_REF@16..19
                 IDENT@16..19 "u32"
       R_CURLY@19..20 "}"
-  STRUCT_DEF@20..40
+  STRUCT@20..40
     STRUCT_KW@20..26 "struct"
     NAME@26..29
       IDENT@26..29 "Bar"
diff --git a/crates/ra_parser/src/grammar/items/adt.rs b/crates/ra_parser/src/grammar/items/adt.rs
index ec06e2d451f..2f5cfb6b6d3 100644
--- a/crates/ra_parser/src/grammar/items/adt.rs
+++ b/crates/ra_parser/src/grammar/items/adt.rs
@@ -5,7 +5,7 @@ use super::*;
 pub(super) fn struct_def(p: &mut Parser, m: Marker) {
     assert!(p.at(T![struct]));
     p.bump(T![struct]);
-    struct_or_union(p, m, T![struct], STRUCT_DEF);
+    struct_or_union(p, m, T![struct], STRUCT);
 }
 
 pub(super) fn union_def(p: &mut Parser, m: Marker) {
diff --git a/crates/ra_parser/src/syntax_kind/generated.rs b/crates/ra_parser/src/syntax_kind/generated.rs
index 7efdeeac6f8..4fad765c7c3 100644
--- a/crates/ra_parser/src/syntax_kind/generated.rs
+++ b/crates/ra_parser/src/syntax_kind/generated.rs
@@ -1,7 +1,7 @@
 //! Generated file, do not edit by hand, see `xtask/src/codegen`
 
 #![allow(bad_style, missing_docs, unreachable_pub)]
-#[doc = r" The kind of syntax node, e.g. `IDENT`, `USE_KW`, or `STRUCT_DEF`."]
+#[doc = r" The kind of syntax node, e.g. `IDENT`, `USE_KW`, or `STRUCT`."]
 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
 #[repr(u16)]
 pub enum SyntaxKind {
@@ -123,7 +123,7 @@ pub enum SyntaxKind {
     L_DOLLAR,
     R_DOLLAR,
     SOURCE_FILE,
-    STRUCT_DEF,
+    STRUCT,
     UNION,
     ENUM_DEF,
     FN,
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs
index 452e67c70b9..b69b6e85e98 100644
--- a/crates/ra_syntax/src/ast.rs
+++ b/crates/ra_syntax/src/ast.rs
@@ -235,7 +235,7 @@ fn test_comments_preserve_trailing_whitespace() {
     )
     .ok()
     .unwrap();
-    let def = file.syntax().descendants().find_map(StructDef::cast).unwrap();
+    let def = file.syntax().descendants().find_map(Struct::cast).unwrap();
     assert_eq!(
         "Representation of a Realm.   \nIn the specification these are called Realm Records.",
         def.doc_comment_text().unwrap()
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index d153e8528ac..0fd3d4f1b54 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -155,14 +155,14 @@ impl StaticDef {
     pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
 }
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct StructDef {
+pub struct Struct {
     pub(crate) syntax: SyntaxNode,
 }
-impl ast::AttrsOwner for StructDef {}
-impl ast::NameOwner for StructDef {}
-impl ast::VisibilityOwner for StructDef {}
-impl ast::GenericParamsOwner for StructDef {}
-impl StructDef {
+impl ast::AttrsOwner for Struct {}
+impl ast::NameOwner for Struct {}
+impl ast::VisibilityOwner for Struct {}
+impl ast::GenericParamsOwner for Struct {}
+impl Struct {
     pub fn struct_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![struct]) }
     pub fn semicolon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![;]) }
     pub fn field_list(&self) -> Option<FieldList> { support::child(&self.syntax) }
@@ -1281,7 +1281,7 @@ pub enum Item {
     MacroCall(MacroCall),
     Module(Module),
     StaticDef(StaticDef),
-    StructDef(StructDef),
+    Struct(Struct),
     TraitDef(TraitDef),
     TypeAlias(TypeAlias),
     Union(Union),
@@ -1391,7 +1391,7 @@ impl ast::NameOwner for ExternItem {}
 impl ast::VisibilityOwner for ExternItem {}
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub enum AdtDef {
-    StructDef(StructDef),
+    Struct(Struct),
     EnumDef(EnumDef),
     Union(Union),
 }
@@ -1520,8 +1520,8 @@ impl AstNode for StaticDef {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for StructDef {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == STRUCT_DEF }
+impl AstNode for Struct {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == STRUCT }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         if Self::can_cast(syntax.kind()) {
             Some(Self { syntax })
@@ -2801,8 +2801,8 @@ impl From<Module> for Item {
 impl From<StaticDef> for Item {
     fn from(node: StaticDef) -> Item { Item::StaticDef(node) }
 }
-impl From<StructDef> for Item {
-    fn from(node: StructDef) -> Item { Item::StructDef(node) }
+impl From<Struct> for Item {
+    fn from(node: Struct) -> Item { Item::Struct(node) }
 }
 impl From<TraitDef> for Item {
     fn from(node: TraitDef) -> Item { Item::TraitDef(node) }
@@ -2820,7 +2820,7 @@ impl AstNode for Item {
     fn can_cast(kind: SyntaxKind) -> bool {
         match kind {
             CONST_DEF | ENUM_DEF | EXTERN_BLOCK | EXTERN_CRATE | FN | IMPL_DEF | MACRO_CALL
-            | MODULE | STATIC_DEF | STRUCT_DEF | TRAIT_DEF | TYPE_ALIAS | UNION | USE => true,
+            | MODULE | STATIC_DEF | STRUCT | TRAIT_DEF | TYPE_ALIAS | UNION | USE => true,
             _ => false,
         }
     }
@@ -2835,7 +2835,7 @@ impl AstNode for Item {
             MACRO_CALL => Item::MacroCall(MacroCall { syntax }),
             MODULE => Item::Module(Module { syntax }),
             STATIC_DEF => Item::StaticDef(StaticDef { syntax }),
-            STRUCT_DEF => Item::StructDef(StructDef { syntax }),
+            STRUCT => Item::Struct(Struct { syntax }),
             TRAIT_DEF => Item::TraitDef(TraitDef { syntax }),
             TYPE_ALIAS => Item::TypeAlias(TypeAlias { syntax }),
             UNION => Item::Union(Union { syntax }),
@@ -2855,7 +2855,7 @@ impl AstNode for Item {
             Item::MacroCall(it) => &it.syntax,
             Item::Module(it) => &it.syntax,
             Item::StaticDef(it) => &it.syntax,
-            Item::StructDef(it) => &it.syntax,
+            Item::Struct(it) => &it.syntax,
             Item::TraitDef(it) => &it.syntax,
             Item::TypeAlias(it) => &it.syntax,
             Item::Union(it) => &it.syntax,
@@ -3372,8 +3372,8 @@ impl AstNode for ExternItem {
         }
     }
 }
-impl From<StructDef> for AdtDef {
-    fn from(node: StructDef) -> AdtDef { AdtDef::StructDef(node) }
+impl From<Struct> for AdtDef {
+    fn from(node: Struct) -> AdtDef { AdtDef::Struct(node) }
 }
 impl From<EnumDef> for AdtDef {
     fn from(node: EnumDef) -> AdtDef { AdtDef::EnumDef(node) }
@@ -3384,13 +3384,13 @@ impl From<Union> for AdtDef {
 impl AstNode for AdtDef {
     fn can_cast(kind: SyntaxKind) -> bool {
         match kind {
-            STRUCT_DEF | ENUM_DEF | UNION => true,
+            STRUCT | ENUM_DEF | UNION => true,
             _ => false,
         }
     }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
         let res = match syntax.kind() {
-            STRUCT_DEF => AdtDef::StructDef(StructDef { syntax }),
+            STRUCT => AdtDef::Struct(Struct { syntax }),
             ENUM_DEF => AdtDef::EnumDef(EnumDef { syntax }),
             UNION => AdtDef::Union(Union { syntax }),
             _ => return None,
@@ -3399,7 +3399,7 @@ impl AstNode for AdtDef {
     }
     fn syntax(&self) -> &SyntaxNode {
         match self {
-            AdtDef::StructDef(it) => &it.syntax,
+            AdtDef::Struct(it) => &it.syntax,
             AdtDef::EnumDef(it) => &it.syntax,
             AdtDef::Union(it) => &it.syntax,
         }
@@ -3510,7 +3510,7 @@ impl std::fmt::Display for StaticDef {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for StructDef {
+impl std::fmt::Display for Struct {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
     }
diff --git a/crates/ra_syntax/src/ast/node_ext.rs b/crates/ra_syntax/src/ast/node_ext.rs
index ce11a751385..2299988ce74 100644
--- a/crates/ra_syntax/src/ast/node_ext.rs
+++ b/crates/ra_syntax/src/ast/node_ext.rs
@@ -183,7 +183,7 @@ impl StructKind {
     }
 }
 
-impl ast::StructDef {
+impl ast::Struct {
     pub fn kind(&self) -> StructKind {
         StructKind::from_node(self)
     }
@@ -475,7 +475,7 @@ impl ast::TokenTree {
 
 impl ast::DocCommentsOwner for ast::SourceFile {}
 impl ast::DocCommentsOwner for ast::Fn {}
-impl ast::DocCommentsOwner for ast::StructDef {}
+impl ast::DocCommentsOwner for ast::Struct {}
 impl ast::DocCommentsOwner for ast::Union {}
 impl ast::DocCommentsOwner for ast::RecordField {}
 impl ast::DocCommentsOwner for ast::TupleField {}
diff --git a/crates/ra_syntax/src/parsing/text_tree_sink.rs b/crates/ra_syntax/src/parsing/text_tree_sink.rs
index 0a1246c593d..ef260ea592d 100644
--- a/crates/ra_syntax/src/parsing/text_tree_sink.rs
+++ b/crates/ra_syntax/src/parsing/text_tree_sink.rs
@@ -146,8 +146,8 @@ fn n_attached_trivias<'a>(
     trivias: impl Iterator<Item = (SyntaxKind, &'a str)>,
 ) -> usize {
     match kind {
-        MACRO_CALL | CONST_DEF | TYPE_ALIAS | STRUCT_DEF | ENUM_DEF | ENUM_VARIANT | FN
-        | TRAIT_DEF | MODULE | RECORD_FIELD | STATIC_DEF => {
+        MACRO_CALL | CONST_DEF | TYPE_ALIAS | STRUCT | ENUM_DEF | ENUM_VARIANT | FN | TRAIT_DEF
+        | MODULE | RECORD_FIELD | STATIC_DEF => {
             let mut res = 0;
             let mut trivias = trivias.enumerate().peekable();
 
diff --git a/crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.rast b/crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.rast
index 93f6060ed18..bbbf496c82d 100644
--- a/crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.rast
+++ b/crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.rast
@@ -1,5 +1,5 @@
 SOURCE_FILE@0..34
-  STRUCT_DEF@0..34
+  STRUCT@0..34
     STRUCT_KW@0..6 "struct"
     WHITESPACE@6..7 " "
     NAME@7..8
diff --git a/crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.rast b/crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.rast
index 7e2f429e1eb..6dc73bfdbae 100644
--- a/crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.rast
+++ b/crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.rast
@@ -5,7 +5,7 @@ SOURCE_FILE@0..21
   ERROR@3..8
     MATCH_KW@3..8 "match"
   WHITESPACE@8..10 "\n\n"
-  STRUCT_DEF@10..21
+  STRUCT@10..21
     STRUCT_KW@10..16 "struct"
     WHITESPACE@16..17 " "
     NAME@17..18
diff --git a/crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.rast b/crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.rast
index e0f3916b37c..7763fad840b 100644
--- a/crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.rast
+++ b/crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.rast
@@ -1,5 +1,5 @@
 SOURCE_FILE@0..40
-  STRUCT_DEF@0..39
+  STRUCT@0..39
     STRUCT_KW@0..6 "struct"
     WHITESPACE@6..7 " "
     NAME@7..8
diff --git a/crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.rast b/crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.rast
index ad9447761f8..5f85c3943ab 100644
--- a/crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.rast
+++ b/crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.rast
@@ -1,5 +1,5 @@
 SOURCE_FILE@0..74
-  STRUCT_DEF@0..73
+  STRUCT@0..73
     STRUCT_KW@0..6 "struct"
     WHITESPACE@6..7 " "
     NAME@7..8
diff --git a/crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.rast b/crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.rast
index 2ae5bacea3e..560bfd75186 100644
--- a/crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.rast
+++ b/crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.rast
@@ -2,7 +2,7 @@ SOURCE_FILE@0..31
   ERROR@0..1
     R_CURLY@0..1 "}"
   WHITESPACE@1..3 "\n\n"
-  STRUCT_DEF@3..12
+  STRUCT@3..12
     STRUCT_KW@3..9 "struct"
     WHITESPACE@9..10 " "
     NAME@10..11
diff --git a/crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.rast b/crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.rast
index 10081a8708d..dacf71aa165 100644
--- a/crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.rast
+++ b/crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.rast
@@ -1,5 +1,5 @@
 SOURCE_FILE@0..43
-  STRUCT_DEF@0..11
+  STRUCT@0..11
     STRUCT_KW@0..6 "struct"
     WHITESPACE@6..7 " "
     NAME@7..8
@@ -38,7 +38,7 @@ SOURCE_FILE@0..43
     WHITESPACE@29..30 "\n"
     R_CURLY@30..31 "}"
   WHITESPACE@31..33 "\n\n"
-  STRUCT_DEF@33..42
+  STRUCT@33..42
     STRUCT_KW@33..39 "struct"
     WHITESPACE@39..40 " "
     NAME@40..41
diff --git a/crates/ra_syntax/test_data/parser/err/0011_extern_struct.rast b/crates/ra_syntax/test_data/parser/err/0011_extern_struct.rast
index 87c54c32cfe..b02d390af9b 100644
--- a/crates/ra_syntax/test_data/parser/err/0011_extern_struct.rast
+++ b/crates/ra_syntax/test_data/parser/err/0011_extern_struct.rast
@@ -3,7 +3,7 @@ SOURCE_FILE@0..19
     ABI@0..6
       EXTERN_KW@0..6 "extern"
   WHITESPACE@6..7 " "
-  STRUCT_DEF@7..18
+  STRUCT@7..18
     STRUCT_KW@7..13 "struct"
     WHITESPACE@13..14 " "
     NAME@14..17
diff --git a/crates/ra_syntax/test_data/parser/err/0013_invalid_type.rast b/crates/ra_syntax/test_data/parser/err/0013_invalid_type.rast
index c3591d25c20..3eef848fc8e 100644
--- a/crates/ra_syntax/test_data/parser/err/0013_invalid_type.rast
+++ b/crates/ra_syntax/test_data/parser/err/0013_invalid_type.rast
@@ -1,5 +1,5 @@
 SOURCE_FILE@0..86
-  STRUCT_DEF@0..72
+  STRUCT@0..72
     VISIBILITY@0..3
       PUB_KW@0..3 "pub"
     WHITESPACE@3..4 " "
diff --git a/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rast b/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rast
index 866f6111361..02339d03572 100644
--- a/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rast
+++ b/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.rast
@@ -28,7 +28,7 @@ SOURCE_FILE@0..112
         ERROR@17..18
           COMMA@17..18 ","
       WHITESPACE@18..19 " "
-      STRUCT_DEF@19..26
+      STRUCT@19..26
         STRUCT_KW@19..25 "struct"
         ERROR@25..26
           COMMA@25..26 ","
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast b/crates/ra_syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast
index 49aca06b02d..e95688f56a5 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast
@@ -1,5 +1,5 @@
 SOURCE_FILE@0..35
-  STRUCT_DEF@0..34
+  STRUCT@0..34
     STRUCT_KW@0..6 "struct"
     WHITESPACE@6..7 " "
     NAME@7..8
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0022_crate_visibility.rast b/crates/ra_syntax/test_data/parser/inline/ok/0022_crate_visibility.rast
index 1b810607eda..50742cbcf1f 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0022_crate_visibility.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0022_crate_visibility.rast
@@ -1,5 +1,5 @@
 SOURCE_FILE@0..81
-  STRUCT_DEF@0..20
+  STRUCT@0..20
     VISIBILITY@0..10
       PUB_KW@0..3 "pub"
       L_PAREN@3..4 "("
@@ -12,7 +12,7 @@ SOURCE_FILE@0..81
       IDENT@18..19 "S"
     SEMICOLON@19..20 ";"
   WHITESPACE@20..21 "\n"
-  STRUCT_DEF@21..40
+  STRUCT@21..40
     VISIBILITY@21..30
       PUB_KW@21..24 "pub"
       L_PAREN@24..25 "("
@@ -25,7 +25,7 @@ SOURCE_FILE@0..81
       IDENT@38..39 "S"
     SEMICOLON@39..40 ";"
   WHITESPACE@40..41 "\n"
-  STRUCT_DEF@41..60
+  STRUCT@41..60
     VISIBILITY@41..50
       PUB_KW@41..44 "pub"
       L_PAREN@44..45 "("
@@ -38,7 +38,7 @@ SOURCE_FILE@0..81
       IDENT@58..59 "S"
     SEMICOLON@59..60 ";"
   WHITESPACE@60..61 "\n"
-  STRUCT_DEF@61..80
+  STRUCT@61..80
     VISIBILITY@61..70
       PUB_KW@61..64 "pub"
       L_PAREN@64..65 "("
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rast b/crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rast
index a0ad078074c..db5bd284969 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0040_crate_keyword_vis.rast
@@ -16,7 +16,7 @@ SOURCE_FILE@0..71
       WHITESPACE@17..18 " "
       R_CURLY@18..19 "}"
   WHITESPACE@19..20 "\n"
-  STRUCT_DEF@20..49
+  STRUCT@20..49
     STRUCT_KW@20..26 "struct"
     WHITESPACE@26..27 " "
     NAME@27..28
@@ -41,7 +41,7 @@ SOURCE_FILE@0..71
       WHITESPACE@47..48 " "
       R_CURLY@48..49 "}"
   WHITESPACE@49..50 "\n"
-  STRUCT_DEF@50..70
+  STRUCT@50..70
     STRUCT_KW@50..56 "struct"
     WHITESPACE@56..57 " "
     NAME@57..58
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.rast b/crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.rast
index 775bc286908..9ae271817e9 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.rast
@@ -1,5 +1,5 @@
 SOURCE_FILE@0..64
-  STRUCT_DEF@0..63
+  STRUCT@0..63
     STRUCT_KW@0..6 "struct"
     WHITESPACE@6..7 " "
     NAME@7..8
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rast b/crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rast
index f6417ab131e..de8217064f1 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0062_mod_contents.rast
@@ -57,7 +57,7 @@ SOURCE_FILE@0..70
       L_CURLY@57..58 "{"
       R_CURLY@58..59 "}"
   WHITESPACE@59..60 "\n"
-  STRUCT_DEF@60..69
+  STRUCT@60..69
     STRUCT_KW@60..66 "struct"
     WHITESPACE@66..67 " "
     NAME@67..68
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.rast b/crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.rast
index 0d9a366185a..cdbc40fe0b2 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0083_struct_items.rast
@@ -1,12 +1,12 @@
 SOURCE_FILE@0..106
-  STRUCT_DEF@0..11
+  STRUCT@0..11
     STRUCT_KW@0..6 "struct"
     WHITESPACE@6..7 " "
     NAME@7..10
       IDENT@7..10 "Foo"
     SEMICOLON@10..11 ";"
   WHITESPACE@11..12 "\n"
-  STRUCT_DEF@12..25
+  STRUCT@12..25
     STRUCT_KW@12..18 "struct"
     WHITESPACE@18..19 " "
     NAME@19..22
@@ -16,7 +16,7 @@ SOURCE_FILE@0..106
       L_CURLY@23..24 "{"
       R_CURLY@24..25 "}"
   WHITESPACE@25..26 "\n"
-  STRUCT_DEF@26..39
+  STRUCT@26..39
     STRUCT_KW@26..32 "struct"
     WHITESPACE@32..33 " "
     NAME@33..36
@@ -26,7 +26,7 @@ SOURCE_FILE@0..106
       R_PAREN@37..38 ")"
     SEMICOLON@38..39 ";"
   WHITESPACE@39..40 "\n"
-  STRUCT_DEF@40..66
+  STRUCT@40..66
     STRUCT_KW@40..46 "struct"
     WHITESPACE@46..47 " "
     NAME@47..50
@@ -50,7 +50,7 @@ SOURCE_FILE@0..106
       R_PAREN@64..65 ")"
     SEMICOLON@65..66 ";"
   WHITESPACE@66..67 "\n"
-  STRUCT_DEF@67..105
+  STRUCT@67..105
     STRUCT_KW@67..73 "struct"
     WHITESPACE@73..74 " "
     NAME@74..77
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0090_type_param_default.rast b/crates/ra_syntax/test_data/parser/inline/ok/0090_type_param_default.rast
index 1d24619c399..2ef026e3709 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0090_type_param_default.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0090_type_param_default.rast
@@ -1,5 +1,5 @@
 SOURCE_FILE@0..19
-  STRUCT_DEF@0..18
+  STRUCT@0..18
     STRUCT_KW@0..6 "struct"
     WHITESPACE@6..7 " "
     NAME@7..8
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.rast b/crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.rast
index 3c9af3d1fe6..0e1594dc485 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0114_tuple_struct_where.rast
@@ -1,5 +1,5 @@
 SOURCE_FILE@0..53
-  STRUCT_DEF@0..33
+  STRUCT@0..33
     STRUCT_KW@0..6 "struct"
     WHITESPACE@6..7 " "
     NAME@7..11
@@ -40,7 +40,7 @@ SOURCE_FILE@0..53
                     IDENT@27..32 "Clone"
     SEMICOLON@32..33 ";"
   WHITESPACE@33..34 "\n"
-  STRUCT_DEF@34..52
+  STRUCT@34..52
     STRUCT_KW@34..40 "struct"
     WHITESPACE@40..41 " "
     NAME@41..45
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.rast b/crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.rast
index 51812a4f2d6..4d09c9f50f3 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.rast
@@ -1,5 +1,5 @@
 SOURCE_FILE@0..60
-  STRUCT_DEF@0..59
+  STRUCT@0..59
     STRUCT_KW@0..6 "struct"
     WHITESPACE@6..7 " "
     NAME@7..8
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rast b/crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rast
index d92bf84f421..280f947ce06 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0134_nocontentexpr_after_item.rast
@@ -47,7 +47,7 @@ SOURCE_FILE@0..111
           R_CURLY@89..90 "}"
       SEMICOLON@90..91 ";"
       WHITESPACE@91..96 "\n    "
-      STRUCT_DEF@96..107
+      STRUCT@96..107
         STRUCT_KW@96..102 "struct"
         WHITESPACE@102..103 " "
         NAME@103..104
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0147_const_param.rast b/crates/ra_syntax/test_data/parser/inline/ok/0147_const_param.rast
index 6981ef9710a..9312eab65e4 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0147_const_param.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0147_const_param.rast
@@ -1,5 +1,5 @@
 SOURCE_FILE@0..24
-  STRUCT_DEF@0..23
+  STRUCT@0..23
     STRUCT_KW@0..6 "struct"
     WHITESPACE@6..7 " "
     NAME@7..8
diff --git a/crates/ra_syntax/test_data/parser/ok/0001_struct_item.rast b/crates/ra_syntax/test_data/parser/ok/0001_struct_item.rast
index c9d1af92f2e..a171fe7a86d 100644
--- a/crates/ra_syntax/test_data/parser/ok/0001_struct_item.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0001_struct_item.rast
@@ -1,5 +1,5 @@
 SOURCE_FILE@0..32
-  STRUCT_DEF@0..31
+  STRUCT@0..31
     STRUCT_KW@0..6 "struct"
     WHITESPACE@6..7 " "
     NAME@7..8
diff --git a/crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.rast b/crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.rast
index 57fb7a329e5..362892b91f1 100644
--- a/crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0002_struct_item_field.rast
@@ -1,5 +1,5 @@
 SOURCE_FILE@0..25
-  STRUCT_DEF@0..25
+  STRUCT@0..25
     STRUCT_KW@0..6 "struct"
     WHITESPACE@6..7 " "
     NAME@7..8
diff --git a/crates/ra_syntax/test_data/parser/ok/0008_mod_item.rast b/crates/ra_syntax/test_data/parser/ok/0008_mod_item.rast
index 60ded78d5c7..b2c1d791f14 100644
--- a/crates/ra_syntax/test_data/parser/ok/0008_mod_item.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0008_mod_item.rast
@@ -40,7 +40,7 @@ SOURCE_FILE@0..118
           WHITESPACE@41..46 "\n    "
           R_CURLY@46..47 "}"
       WHITESPACE@47..52 "\n    "
-      STRUCT_DEF@52..63
+      STRUCT@52..63
         STRUCT_KW@52..58 "struct"
         WHITESPACE@58..59 " "
         NAME@59..60
diff --git a/crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.rast b/crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.rast
index 00b1b65be6e..b15f41dd7e9 100644
--- a/crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0016_struct_flavors.rast
@@ -1,12 +1,12 @@
 SOURCE_FILE@0..97
-  STRUCT_DEF@0..9
+  STRUCT@0..9
     STRUCT_KW@0..6 "struct"
     WHITESPACE@6..7 " "
     NAME@7..8
       IDENT@7..8 "A"
     SEMICOLON@8..9 ";"
   WHITESPACE@9..10 "\n"
-  STRUCT_DEF@10..21
+  STRUCT@10..21
     STRUCT_KW@10..16 "struct"
     WHITESPACE@16..17 " "
     NAME@17..18
@@ -16,7 +16,7 @@ SOURCE_FILE@0..97
       L_CURLY@19..20 "{"
       R_CURLY@20..21 "}"
   WHITESPACE@21..22 "\n"
-  STRUCT_DEF@22..33
+  STRUCT@22..33
     STRUCT_KW@22..28 "struct"
     WHITESPACE@28..29 " "
     NAME@29..30
@@ -26,7 +26,7 @@ SOURCE_FILE@0..97
       R_PAREN@31..32 ")"
     SEMICOLON@32..33 ";"
   WHITESPACE@33..35 "\n\n"
-  STRUCT_DEF@35..74
+  STRUCT@35..74
     STRUCT_KW@35..41 "struct"
     WHITESPACE@41..42 " "
     NAME@42..43
@@ -63,7 +63,7 @@ SOURCE_FILE@0..97
       WHITESPACE@72..73 "\n"
       R_CURLY@73..74 "}"
   WHITESPACE@74..76 "\n\n"
-  STRUCT_DEF@76..96
+  STRUCT@76..96
     STRUCT_KW@76..82 "struct"
     WHITESPACE@82..83 " "
     NAME@83..84
diff --git a/crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.rast b/crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.rast
index b757bd16dcc..630aa0708bb 100644
--- a/crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0018_struct_type_params.rast
@@ -1,5 +1,5 @@
 SOURCE_FILE@0..290
-  STRUCT_DEF@0..13
+  STRUCT@0..13
     STRUCT_KW@0..6 "struct"
     WHITESPACE@6..7 " "
     NAME@7..9
@@ -12,7 +12,7 @@ SOURCE_FILE@0..290
       R_ANGLE@11..12 ">"
     SEMICOLON@12..13 ";"
   WHITESPACE@13..14 "\n"
-  STRUCT_DEF@14..32
+  STRUCT@14..32
     STRUCT_KW@14..20 "struct"
     WHITESPACE@20..21 " "
     NAME@21..23
@@ -34,7 +34,7 @@ SOURCE_FILE@0..290
       R_PAREN@30..31 ")"
     SEMICOLON@31..32 ";"
   WHITESPACE@32..33 "\n"
-  STRUCT_DEF@33..56
+  STRUCT@33..56
     STRUCT_KW@33..39 "struct"
     WHITESPACE@39..40 " "
     NAME@40..42
@@ -62,7 +62,7 @@ SOURCE_FILE@0..290
       WHITESPACE@54..55 " "
       R_CURLY@55..56 "}"
   WHITESPACE@56..58 "\n\n"
-  STRUCT_DEF@58..70
+  STRUCT@58..70
     STRUCT_KW@58..64 "struct"
     WHITESPACE@64..65 " "
     NAME@65..67
@@ -72,7 +72,7 @@ SOURCE_FILE@0..290
       R_ANGLE@68..69 ">"
     SEMICOLON@69..70 ";"
   WHITESPACE@70..71 "\n"
-  STRUCT_DEF@71..85
+  STRUCT@71..85
     STRUCT_KW@71..77 "struct"
     WHITESPACE@77..78 " "
     NAME@78..80
@@ -84,7 +84,7 @@ SOURCE_FILE@0..290
       R_ANGLE@83..84 ">"
     SEMICOLON@84..85 ";"
   WHITESPACE@85..86 "\n"
-  STRUCT_DEF@86..101
+  STRUCT@86..101
     STRUCT_KW@86..92 "struct"
     WHITESPACE@92..93 " "
     NAME@93..95
@@ -97,7 +97,7 @@ SOURCE_FILE@0..290
       R_ANGLE@99..100 ">"
     SEMICOLON@100..101 ";"
   WHITESPACE@101..102 "\n"
-  STRUCT_DEF@102..120
+  STRUCT@102..120
     STRUCT_KW@102..108 "struct"
     WHITESPACE@108..109 " "
     NAME@109..111
@@ -112,7 +112,7 @@ SOURCE_FILE@0..290
       R_ANGLE@118..119 ">"
     SEMICOLON@119..120 ";"
   WHITESPACE@120..121 "\n"
-  STRUCT_DEF@121..142
+  STRUCT@121..142
     STRUCT_KW@121..127 "struct"
     WHITESPACE@127..128 " "
     NAME@128..130
@@ -130,7 +130,7 @@ SOURCE_FILE@0..290
       R_ANGLE@140..141 ">"
     SEMICOLON@141..142 ";"
   WHITESPACE@142..143 "\n"
-  STRUCT_DEF@143..166
+  STRUCT@143..166
     STRUCT_KW@143..149 "struct"
     WHITESPACE@149..150 " "
     NAME@150..152
@@ -149,7 +149,7 @@ SOURCE_FILE@0..290
       R_ANGLE@164..165 ">"
     SEMICOLON@165..166 ";"
   WHITESPACE@166..167 "\n"
-  STRUCT_DEF@167..183
+  STRUCT@167..183
     STRUCT_KW@167..173 "struct"
     WHITESPACE@173..174 " "
     NAME@174..177
@@ -162,7 +162,7 @@ SOURCE_FILE@0..290
       R_ANGLE@181..182 ">"
     SEMICOLON@182..183 ";"
   WHITESPACE@183..184 "\n"
-  STRUCT_DEF@184..203
+  STRUCT@184..203
     STRUCT_KW@184..190 "struct"
     WHITESPACE@190..191 " "
     NAME@191..194
@@ -178,7 +178,7 @@ SOURCE_FILE@0..290
       R_ANGLE@201..202 ">"
     SEMICOLON@202..203 ";"
   WHITESPACE@203..204 "\n"
-  STRUCT_DEF@204..233
+  STRUCT@204..233
     STRUCT_KW@204..210 "struct"
     WHITESPACE@210..211 " "
     NAME@211..214
@@ -202,7 +202,7 @@ SOURCE_FILE@0..290
       R_ANGLE@231..232 ">"
     SEMICOLON@232..233 ";"
   WHITESPACE@233..235 "\n\n"
-  STRUCT_DEF@235..249
+  STRUCT@235..249
     STRUCT_KW@235..241 "struct"
     WHITESPACE@241..242 " "
     NAME@242..245
@@ -215,7 +215,7 @@ SOURCE_FILE@0..290
       R_ANGLE@247..248 ">"
     SEMICOLON@248..249 ";"
   WHITESPACE@249..250 "\n"
-  STRUCT_DEF@250..267
+  STRUCT@250..267
     STRUCT_KW@250..256 "struct"
     WHITESPACE@256..257 " "
     NAME@257..260
@@ -233,7 +233,7 @@ SOURCE_FILE@0..290
       R_ANGLE@265..266 ">"
     SEMICOLON@266..267 ";"
   WHITESPACE@267..268 "\n"
-  STRUCT_DEF@268..289
+  STRUCT@268..289
     STRUCT_KW@268..274 "struct"
     WHITESPACE@274..275 " "
     NAME@275..278
diff --git a/crates/ra_syntax/test_data/parser/ok/0020_type_param_bounds.rast b/crates/ra_syntax/test_data/parser/ok/0020_type_param_bounds.rast
index 5100e6a48af..9bdc50e1e79 100644
--- a/crates/ra_syntax/test_data/parser/ok/0020_type_param_bounds.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0020_type_param_bounds.rast
@@ -1,5 +1,5 @@
 SOURCE_FILE@0..250
-  STRUCT_DEF@0..12
+  STRUCT@0..12
     STRUCT_KW@0..6 "struct"
     WHITESPACE@6..7 " "
     NAME@7..8
@@ -12,7 +12,7 @@ SOURCE_FILE@0..250
       R_ANGLE@10..11 ">"
     SEMICOLON@11..12 ";"
   WHITESPACE@12..13 "\n"
-  STRUCT_DEF@13..26
+  STRUCT@13..26
     STRUCT_KW@13..19 "struct"
     WHITESPACE@19..20 " "
     NAME@20..21
@@ -27,7 +27,7 @@ SOURCE_FILE@0..250
       R_ANGLE@24..25 ">"
     SEMICOLON@25..26 ";"
   WHITESPACE@26..27 "\n"
-  STRUCT_DEF@27..43
+  STRUCT@27..43
     STRUCT_KW@27..33 "struct"
     WHITESPACE@33..34 " "
     NAME@34..35
@@ -45,7 +45,7 @@ SOURCE_FILE@0..250
       R_ANGLE@41..42 ">"
     SEMICOLON@42..43 ";"
   WHITESPACE@43..44 "\n"
-  STRUCT_DEF@44..63
+  STRUCT@44..63
     STRUCT_KW@44..50 "struct"
     WHITESPACE@50..51 " "
     NAME@51..52
@@ -66,7 +66,7 @@ SOURCE_FILE@0..250
       R_ANGLE@61..62 ">"
     SEMICOLON@62..63 ";"
   WHITESPACE@63..64 "\n"
-  STRUCT_DEF@64..86
+  STRUCT@64..86
     STRUCT_KW@64..70 "struct"
     WHITESPACE@70..71 " "
     NAME@71..72
@@ -90,7 +90,7 @@ SOURCE_FILE@0..250
       R_ANGLE@84..85 ">"
     SEMICOLON@85..86 ";"
   WHITESPACE@86..87 "\n"
-  STRUCT_DEF@87..116
+  STRUCT@87..116
     STRUCT_KW@87..93 "struct"
     WHITESPACE@93..94 " "
     NAME@94..95
@@ -122,7 +122,7 @@ SOURCE_FILE@0..250
       R_ANGLE@114..115 ">"
     SEMICOLON@115..116 ";"
   WHITESPACE@116..117 "\n"
-  STRUCT_DEF@117..143
+  STRUCT@117..143
     STRUCT_KW@117..123 "struct"
     WHITESPACE@123..124 " "
     NAME@124..125
@@ -153,7 +153,7 @@ SOURCE_FILE@0..250
       R_ANGLE@141..142 ">"
     SEMICOLON@142..143 ";"
   WHITESPACE@143..144 "\n"
-  STRUCT_DEF@144..180
+  STRUCT@144..180
     STRUCT_KW@144..150 "struct"
     WHITESPACE@150..151 " "
     NAME@151..152
@@ -194,7 +194,7 @@ SOURCE_FILE@0..250
       R_ANGLE@178..179 ">"
     SEMICOLON@179..180 ";"
   WHITESPACE@180..181 "\n"
-  STRUCT_DEF@181..199
+  STRUCT@181..199
     STRUCT_KW@181..187 "struct"
     WHITESPACE@187..188 " "
     NAME@188..189
@@ -217,7 +217,7 @@ SOURCE_FILE@0..250
       R_ANGLE@197..198 ">"
     SEMICOLON@198..199 ";"
   WHITESPACE@199..200 "\n"
-  STRUCT_DEF@200..250
+  STRUCT@200..250
     STRUCT_KW@200..206 "struct"
     WHITESPACE@206..207 " "
     NAME@207..208
diff --git a/crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.rast b/crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.rast
index 0f0138c861d..8cfc14f491c 100644
--- a/crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0040_raw_struct_item_field.rast
@@ -1,5 +1,5 @@
 SOURCE_FILE@0..27
-  STRUCT_DEF@0..27
+  STRUCT@0..27
     STRUCT_KW@0..6 "struct"
     WHITESPACE@6..7 " "
     NAME@7..8
diff --git a/crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.rast b/crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.rast
index 4f0c6882203..c4ffc0a3d8b 100644
--- a/crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.rast
@@ -1,7 +1,7 @@
 SOURCE_FILE@0..199
   COMMENT@0..60 "// https://github.com ..."
   WHITESPACE@60..62 "\n\n"
-  STRUCT_DEF@62..73
+  STRUCT@62..73
     STRUCT_KW@62..68 "struct"
     WHITESPACE@68..69 " "
     NAME@69..72
diff --git a/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast b/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast
index 9c2ea37549f..adc4a22e969 100644
--- a/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast
@@ -1,7 +1,7 @@
 SOURCE_FILE@0..160
   COMMENT@0..60 "// https://github.com ..."
   WHITESPACE@60..62 "\n\n"
-  STRUCT_DEF@62..90
+  STRUCT@62..90
     STRUCT_KW@62..68 "struct"
     WHITESPACE@68..69 " "
     NAME@69..73
diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs
index 6f918612717..cb11dffd072 100644
--- a/crates/rust-analyzer/src/handlers.rs
+++ b/crates/rust-analyzer/src/handlers.rs
@@ -925,7 +925,7 @@ pub(crate) fn handle_code_lens(
                     matches!(
                         it.kind,
                         SyntaxKind::TRAIT_DEF
-                            | SyntaxKind::STRUCT_DEF
+                            | SyntaxKind::STRUCT
                             | SyntaxKind::ENUM_DEF
                             | SyntaxKind::UNION
                     )
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs
index f1373fd614d..a09a74c41c0 100644
--- a/crates/rust-analyzer/src/to_proto.rs
+++ b/crates/rust-analyzer/src/to_proto.rs
@@ -32,7 +32,7 @@ pub(crate) fn range(line_index: &LineIndex, range: TextRange) -> lsp_types::Rang
 pub(crate) fn symbol_kind(syntax_kind: SyntaxKind) -> lsp_types::SymbolKind {
     match syntax_kind {
         SyntaxKind::FN => lsp_types::SymbolKind::Function,
-        SyntaxKind::STRUCT_DEF => lsp_types::SymbolKind::Struct,
+        SyntaxKind::STRUCT => lsp_types::SymbolKind::Struct,
         SyntaxKind::ENUM_DEF => lsp_types::SymbolKind::Enum,
         SyntaxKind::ENUM_VARIANT => lsp_types::SymbolKind::EnumMember,
         SyntaxKind::TRAIT_DEF => lsp_types::SymbolKind::Interface,
diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs
index e21618cbd87..e8a90636e6f 100644
--- a/xtask/src/ast_src.rs
+++ b/xtask/src/ast_src.rs
@@ -93,7 +93,7 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc {
     ],
     nodes: &[
         "SOURCE_FILE",
-        "STRUCT_DEF",
+        "STRUCT",
         "UNION",
         "ENUM_DEF",
         "FN",
diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs
index 84ddda5cb72..e993a750c1d 100644
--- a/xtask/src/codegen/gen_syntax.rs
+++ b/xtask/src/codegen/gen_syntax.rs
@@ -307,7 +307,7 @@ fn generate_syntax_kinds(grammar: KindsSrc<'_>) -> Result<String> {
 
     let ast = quote! {
         #![allow(bad_style, missing_docs, unreachable_pub)]
-        /// The kind of syntax node, e.g. `IDENT`, `USE_KW`, or `STRUCT_DEF`.
+        /// The kind of syntax node, e.g. `IDENT`, `USE_KW`, or `STRUCT`.
         #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
         #[repr(u16)]
         pub enum SyntaxKind {
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram
index 65082f3d910..d038c5c5aca 100644
--- a/xtask/src/codegen/rust.ungram
+++ b/xtask/src/codegen/rust.ungram
@@ -13,7 +13,7 @@ Item =
 | MacroCall
 | Module
 | StaticDef
-| StructDef
+| Struct
 | TraitDef
 | TypeAlias
 | Union
@@ -76,7 +76,7 @@ TypeAlias =
   Attr* Visibility? 'default'? 'type' Name GenericParamList? (':' TypeBoundList?)? WhereClause?
   '=' TypeRef ';'
 
-StructDef =
+Struct =
   Attr* Visibility? 'struct' Name GenericParamList? (
     WhereClause?  (RecordFieldList | ';')
   | TupleFieldList WhereClause? ';'
@@ -453,7 +453,7 @@ MetaItem =
   Path '=' AttrInput nested_meta_items:MetaItem*
 
 AdtDef =
-  StructDef
+  Struct
 | EnumDef
 | Union