Repository: rust-analyzer/rust-analyzer
Pull request #426 (2019-01-04 17:30:10)

Rename ImplItem to ImplBlock
rustc uses the name ImplItem for items in impls, not the impl {} block itself,
which could lead to confusion.

Extracted from #370.


Patch:
diff --git a/crates/ra_editor/src/structure.rs b/crates/ra_editor/src/structure.rs
index 2292b1ddf0..32d59e3351 100644
--- a/crates/ra_editor/src/structure.rs
+++ b/crates/ra_editor/src/structure.rs
@@ -60,7 +60,7 @@ fn structure_node(node: SyntaxNodeRef) -> Option<StructureNode> {
         .visit(decl::<ast::TypeDef>)
         .visit(decl::<ast::ConstDef>)
         .visit(decl::<ast::StaticDef>)
-        .visit(|im: ast::ImplItem| {
+        .visit(|im: ast::ImplBlock| {
             let target_type = im.target_type()?;
             let target_trait = im.target_trait();
             let label = match target_trait {
@@ -121,8 +121,8 @@ impl fmt::Debug for E {}
                 StructureNode { parent: None, label: "T", navigation_range: [81; 82), node_range: [76; 88), kind: TYPE_DEF },
                 StructureNode { parent: None, label: "S", navigation_range: [96; 97), node_range: [89; 108), kind: STATIC_DEF },
                 StructureNode { parent: None, label: "C", navigation_range: [115; 116), node_range: [109; 127), kind: CONST_DEF },
-                StructureNode { parent: None, label: "impl E", navigation_range: [134; 135), node_range: [129; 138), kind: IMPL_ITEM },
-                StructureNode { parent: None, label: "impl fmt::Debug for E", navigation_range: [160; 161), node_range: [140; 164), kind: IMPL_ITEM }]"#,
+                StructureNode { parent: None, label: "impl E", navigation_range: [134; 135), node_range: [129; 138), kind: IMPL_BLOCK },
+                StructureNode { parent: None, label: "impl fmt::Debug for E", navigation_range: [160; 161), node_range: [140; 164), kind: IMPL_BLOCK }]"#,
             &structure,
         )
     }
diff --git a/crates/ra_hir/src/module/nameres.rs b/crates/ra_hir/src/module/nameres.rs
index 8d12096260..3c6851a0a3 100644
--- a/crates/ra_hir/src/module/nameres.rs
+++ b/crates/ra_hir/src/module/nameres.rs
@@ -233,7 +233,7 @@ impl InputModuleItems {
             ast::ModuleItem::TypeDef(it) => {
                 self.items.push(ModuleItem::new(file_id, file_items, it)?)
             }
-            ast::ModuleItem::ImplItem(_) => {
+            ast::ModuleItem::ImplBlock(_) => {
                 // impls don't define items
             }
             ast::ModuleItem::UseItem(it) => self.add_use_item(file_items, it),
diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs
index 7230fb101b..e8eb3940f9 100644
--- a/crates/ra_lsp_server/src/conv.rs
+++ b/crates/ra_lsp_server/src/conv.rs
@@ -44,7 +44,7 @@ impl Conv for SyntaxKind {
             SyntaxKind::TYPE_DEF => SymbolKind::TypeParameter,
             SyntaxKind::STATIC_DEF => SymbolKind::Constant,
             SyntaxKind::CONST_DEF => SymbolKind::Constant,
-            SyntaxKind::IMPL_ITEM => SymbolKind::Object,
+            SyntaxKind::IMPL_BLOCK => SymbolKind::Object,
             _ => SymbolKind::Variable,
         }
     }
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs
index 3aaa5edda6..7f986d3224 100644
--- a/crates/ra_syntax/src/ast.rs
+++ b/crates/ra_syntax/src/ast.rs
@@ -279,7 +279,7 @@ impl<'a> NameRef<'a> {
     }
 }
 
-impl<'a> ImplItem<'a> {
+impl<'a> ImplBlock<'a> {
     pub fn target_type(self) -> Option<TypeRef<'a>> {
         match self.target() {
             (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 c619fc1303..c1c63f555a 100644
--- a/crates/ra_syntax/src/ast/generated.rs
+++ b/crates/ra_syntax/src/ast/generated.rs
@@ -1407,42 +1407,42 @@ impl<'a> IfExpr<'a> {
     }
 }
 
-// ImplItem
+// ImplBlock
 #[derive(Debug, Clone, Copy,)]
-pub struct ImplItemNode<R: TreeRoot<RaTypes> = OwnedRoot> {
+pub struct ImplBlockNode<R: TreeRoot<RaTypes> = OwnedRoot> {
     pub(crate) syntax: SyntaxNode<R>,
 }
-pub type ImplItem<'a> = ImplItemNode<RefRoot<'a>>;
+pub type ImplBlock<'a> = ImplBlockNode<RefRoot<'a>>;
 
-impl<R1: TreeRoot<RaTypes>, R2: TreeRoot<RaTypes>> PartialEq<ImplItemNode<R1>> for ImplItemNode<R2> {
-    fn eq(&self, other: &ImplItemNode<R1>) -> bool { self.syntax == other.syntax }
+impl<R1: TreeRoot<RaTypes>, R2: TreeRoot<RaTypes>> PartialEq<ImplBlockNode<R1>> for ImplBlockNode<R2> {
+    fn eq(&self, other: &ImplBlockNode<R1>) -> bool { self.syntax == other.syntax }
 }
-impl<R: TreeRoot<RaTypes>> Eq for ImplItemNode<R> {}
-impl<R: TreeRoot<RaTypes>> Hash for ImplItemNode<R> {
+impl<R: TreeRoot<RaTypes>> Eq for ImplBlockNode<R> {}
+impl<R: TreeRoot<RaTypes>> Hash for ImplBlockNode<R> {
     fn hash<H: Hasher>(&self, state: &mut H) { self.syntax.hash(state) }
 }
 
-impl<'a> AstNode<'a> for ImplItem<'a> {
+impl<'a> AstNode<'a> for ImplBlock<'a> {
     fn cast(syntax: SyntaxNodeRef<'a>) -> Option<Self> {
         match syntax.kind() {
-            IMPL_ITEM => Some(ImplItem { syntax }),
+            IMPL_BLOCK => Some(ImplBlock { syntax }),
             _ => None,
         }
     }
     fn syntax(self) -> SyntaxNodeRef<'a> { self.syntax }
 }
 
-impl<R: TreeRoot<RaTypes>> ImplItemNode<R> {
-    pub fn borrowed(&self) -> ImplItem {
-        ImplItemNode { syntax: self.syntax.borrowed() }
+impl<R: TreeRoot<RaTypes>> ImplBlockNode<R> {
+    pub fn borrowed(&self) -> ImplBlock {
+        ImplBlockNode { syntax: self.syntax.borrowed() }
     }
-    pub fn owned(&self) -> ImplItemNode {
-        ImplItemNode { syntax: self.syntax.owned() }
+    pub fn owned(&self) -> ImplBlockNode {
+        ImplBlockNode { syntax: self.syntax.owned() }
     }
 }
 
 
-impl<'a> ImplItem<'a> {}
+impl<'a> ImplBlock<'a> {}
 
 // ImplTraitType
 #[derive(Debug, Clone, Copy,)]
@@ -2157,7 +2157,7 @@ pub enum ModuleItem<'a> {
     FnDef(FnDef<'a>),
     TraitDef(TraitDef<'a>),
     TypeDef(TypeDef<'a>),
-    ImplItem(ImplItem<'a>),
+    ImplBlock(ImplBlock<'a>),
     UseItem(UseItem<'a>),
     ExternCrateItem(ExternCrateItem<'a>),
     ConstDef(ConstDef<'a>),
@@ -2173,7 +2173,7 @@ impl<'a> AstNode<'a> for ModuleItem<'a> {
             FN_DEF => Some(ModuleItem::FnDef(FnDef { syntax })),
             TRAIT_DEF => Some(ModuleItem::TraitDef(TraitDef { syntax })),
             TYPE_DEF => Some(ModuleItem::TypeDef(TypeDef { syntax })),
-            IMPL_ITEM => Some(ModuleItem::ImplItem(ImplItem { syntax })),
+            IMPL_BLOCK => Some(ModuleItem::ImplBlock(ImplBlock { syntax })),
             USE_ITEM => Some(ModuleItem::UseItem(UseItem { syntax })),
             EXTERN_CRATE_ITEM => Some(ModuleItem::ExternCrateItem(ExternCrateItem { syntax })),
             CONST_DEF => Some(ModuleItem::ConstDef(ConstDef { syntax })),
@@ -2189,7 +2189,7 @@ impl<'a> AstNode<'a> for ModuleItem<'a> {
             ModuleItem::FnDef(inner) => inner.syntax(),
             ModuleItem::TraitDef(inner) => inner.syntax(),
             ModuleItem::TypeDef(inner) => inner.syntax(),
-            ModuleItem::ImplItem(inner) => inner.syntax(),
+            ModuleItem::ImplBlock(inner) => inner.syntax(),
             ModuleItem::UseItem(inner) => inner.syntax(),
             ModuleItem::ExternCrateItem(inner) => inner.syntax(),
             ModuleItem::ConstDef(inner) => inner.syntax(),
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron
index 2abb9da61f..9a4a96facb 100644
--- a/crates/ra_syntax/src/grammar.ron
+++ b/crates/ra_syntax/src/grammar.ron
@@ -128,7 +128,7 @@ Grammar(
         "STATIC_DEF",
         "CONST_DEF",
         "TRAIT_DEF",
-        "IMPL_ITEM",
+        "IMPL_BLOCK",
         "TYPE_DEF",
         "MACRO_CALL",
         "TOKEN_TREE",
@@ -307,7 +307,7 @@ Grammar(
             "AttrsOwner",
             "DocCommentsOwner"
         ] ),
-        "ImplItem": (),
+        "ImplBlock": (collections: []),
 
         "ParenType": (options: ["TypeRef"]),
         "TupleType": ( collections: [["fields", "TypeRef"]] ),
@@ -348,7 +348,7 @@ Grammar(
             ],
         ),
         "ModuleItem": (
-            enum: ["StructDef", "EnumDef", "FnDef", "TraitDef", "TypeDef", "ImplItem",
+            enum: ["StructDef", "EnumDef", "FnDef", "TraitDef", "TypeDef", "ImplBlock",
                    "UseItem", "ExternCrateItem", "ConstDef", "StaticDef", "Module" ]
         ),
 
diff --git a/crates/ra_syntax/src/grammar/items.rs b/crates/ra_syntax/src/grammar/items.rs
index aa5fe07772..b9a00b5657 100644
--- a/crates/ra_syntax/src/grammar/items.rs
+++ b/crates/ra_syntax/src/grammar/items.rs
@@ -152,7 +152,7 @@ pub(super) fn maybe_item(p: &mut Parser, flavor: ItemFlavor) -> MaybeItem {
         // unsafe default impl Foo {}
         IMPL_KW => {
             traits::impl_item(p);
-            IMPL_ITEM
+            IMPL_BLOCK
         }
         _ => {
             return if has_mods {
diff --git a/crates/ra_syntax/src/reparsing.rs b/crates/ra_syntax/src/reparsing.rs
index 208cae5c8f..7ee71a1b6a 100644
--- a/crates/ra_syntax/src/reparsing.rs
+++ b/crates/ra_syntax/src/reparsing.rs
@@ -100,7 +100,7 @@ fn find_reparsable_node(
             ITEM_LIST => {
                 let parent = node.parent().unwrap();
                 match parent.kind() {
-                    IMPL_ITEM => grammar::impl_item_list,
+                    IMPL_BLOCK => grammar::impl_item_list,
                     TRAIT_DEF => grammar::trait_item_list,
                     MODULE => grammar::mod_item_list,
                     _ => return None,
diff --git a/crates/ra_syntax/src/syntax_kinds/generated.rs b/crates/ra_syntax/src/syntax_kinds/generated.rs
index 3a869ad34b..ef4588d939 100644
--- a/crates/ra_syntax/src/syntax_kinds/generated.rs
+++ b/crates/ra_syntax/src/syntax_kinds/generated.rs
@@ -128,7 +128,7 @@ pub enum SyntaxKind {
     STATIC_DEF,
     CONST_DEF,
     TRAIT_DEF,
-    IMPL_ITEM,
+    IMPL_BLOCK,
     TYPE_DEF,
     MACRO_CALL,
     TOKEN_TREE,
@@ -389,7 +389,7 @@ impl SyntaxKind {
             STATIC_DEF => &SyntaxInfo { name: "STATIC_DEF" },
             CONST_DEF => &SyntaxInfo { name: "CONST_DEF" },
             TRAIT_DEF => &SyntaxInfo { name: "TRAIT_DEF" },
-            IMPL_ITEM => &SyntaxInfo { name: "IMPL_ITEM" },
+            IMPL_BLOCK => &SyntaxInfo { name: "IMPL_BLOCK" },
             TYPE_DEF => &SyntaxInfo { name: "TYPE_DEF" },
             MACRO_CALL => &SyntaxInfo { name: "MACRO_CALL" },
             TOKEN_TREE => &SyntaxInfo { name: "TOKEN_TREE" },


Test patch:
diff --git a/crates/ra_syntax/tests/data/parser/err/0018_incomplete_fn.txt b/crates/ra_syntax/tests/data/parser/err/0018_incomplete_fn.txt
index 3937be2552..262cbba1e9 100644
--- a/crates/ra_syntax/tests/data/parser/err/0018_incomplete_fn.txt
+++ b/crates/ra_syntax/tests/data/parser/err/0018_incomplete_fn.txt
@@ -1,5 +1,5 @@
 SOURCE_FILE@[0; 183)
-  IMPL_ITEM@[0; 182)
+  IMPL_BLOCK@[0; 182)
     IMPL_KW@[0; 4)
     WHITESPACE@[4; 5)
     PATH_TYPE@[5; 13)
diff --git a/crates/ra_syntax/tests/data/parser/err/0022_bad_exprs.txt b/crates/ra_syntax/tests/data/parser/err/0022_bad_exprs.txt
index 55999c1609..da3894133f 100644
--- a/crates/ra_syntax/tests/data/parser/err/0022_bad_exprs.txt
+++ b/crates/ra_syntax/tests/data/parser/err/0022_bad_exprs.txt
@@ -94,7 +94,7 @@ SOURCE_FILE@[0; 112)
           COMMA@[54; 55)
           err: `expected SEMI`
       WHITESPACE@[55; 56)
-      IMPL_ITEM@[56; 60)
+      IMPL_BLOCK@[56; 60)
         IMPL_KW@[56; 60)
         err: `expected type`
         err: `expected `{``
diff --git a/crates/ra_syntax/tests/data/parser/err/0026_imp_recovery.txt b/crates/ra_syntax/tests/data/parser/err/0026_imp_recovery.txt
index 82683f6ee9..9b5fadcf7f 100644
--- a/crates/ra_syntax/tests/data/parser/err/0026_imp_recovery.txt
+++ b/crates/ra_syntax/tests/data/parser/err/0026_imp_recovery.txt
@@ -1,5 +1,5 @@
 SOURCE_FILE@[0; 38)
-  IMPL_ITEM@[0; 14)
+  IMPL_BLOCK@[0; 14)
     IMPL_KW@[0; 4)
     TYPE_PARAM_LIST@[4; 14)
       L_ANGLE@[4; 5)
@@ -17,7 +17,7 @@ SOURCE_FILE@[0; 38)
       err: `expected trait or type`
       err: `expected `{``
   WHITESPACE@[14; 15)
-  IMPL_ITEM@[15; 37)
+  IMPL_BLOCK@[15; 37)
     IMPL_KW@[15; 19)
     TYPE_PARAM_LIST@[19; 22)
       L_ANGLE@[19; 20)
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.txt b/crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.txt
index 75533ecc18..8021aee00b 100644
--- a/crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.txt
@@ -19,7 +19,7 @@ SOURCE_FILE@[0; 30)
             err: `expected a loop`
             err: `expected SEMI`
       WHITESPACE@[22; 23)
-      IMPL_ITEM@[23; 27)
+      IMPL_BLOCK@[23; 27)
         IMPL_KW@[23; 27)
         err: `expected type`
         err: `expected `{``
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt b/crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt
index 7279d5cae4..6875ed016c 100644
--- a/crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt
@@ -1,5 +1,5 @@
 SOURCE_FILE@[0; 87)
-  IMPL_ITEM@[0; 12)
+  IMPL_BLOCK@[0; 12)
     IMPL_KW@[0; 4)
     WHITESPACE@[4; 5)
     PATH_TYPE@[5; 9)
@@ -12,7 +12,7 @@ SOURCE_FILE@[0; 87)
       L_CURLY@[10; 11)
       R_CURLY@[11; 12)
   WHITESPACE@[12; 13)
-  IMPL_ITEM@[13; 33)
+  IMPL_BLOCK@[13; 33)
     IMPL_KW@[13; 17)
     WHITESPACE@[17; 18)
     PATH_TYPE@[18; 24)
@@ -33,12 +33,12 @@ SOURCE_FILE@[0; 87)
       L_CURLY@[31; 32)
       R_CURLY@[32; 33)
   WHITESPACE@[33; 34)
-  IMPL_ITEM@[34; 38)
+  IMPL_BLOCK@[34; 38)
     IMPL_KW@[34; 38)
     err: `expected trait or type`
     err: `expected `{``
   WHITESPACE@[38; 39)
-  IMPL_ITEM@[39; 54)
+  IMPL_BLOCK@[39; 54)
     IMPL_KW@[39; 43)
     WHITESPACE@[43; 44)
     PATH_TYPE@[44; 51)
@@ -51,7 +51,7 @@ SOURCE_FILE@[0; 87)
       L_CURLY@[52; 53)
       R_CURLY@[53; 54)
   WHITESPACE@[54; 55)
-  IMPL_ITEM@[55; 70)
+  IMPL_BLOCK@[55; 70)
     IMPL_KW@[55; 59)
     WHITESPACE@[59; 60)
     PATH_TYPE@[60; 66)
@@ -64,7 +64,7 @@ SOURCE_FILE@[0; 87)
     err: `expected trait or type`
     err: `expected `{``
   WHITESPACE@[70; 71)
-  IMPL_ITEM@[71; 86)
+  IMPL_BLOCK@[71; 86)
     IMPL_KW@[71; 75)
     WHITESPACE@[75; 76)
     PATH_TYPE@[76; 83)
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt
index 998ac3da9e..de7df73122 100644
--- a/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt
@@ -1,5 +1,5 @@
 SOURCE_FILE@[0; 83)
-  IMPL_ITEM@[0; 82)
+  IMPL_BLOCK@[0; 82)
     IMPL_KW@[0; 4)
     WHITESPACE@[4; 5)
     PATH_TYPE@[5; 6)
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0006_self_param.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0006_self_param.txt
index 53027c852d..4df01c6e5c 100644
--- a/crates/ra_syntax/tests/data/parser/inline/ok/0006_self_param.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/ok/0006_self_param.txt
@@ -1,5 +1,5 @@
 SOURCE_FILE@[0; 128)
-  IMPL_ITEM@[0; 127)
+  IMPL_BLOCK@[0; 127)
     IMPL_KW@[0; 4)
     WHITESPACE@[4; 5)
     PATH_TYPE@[5; 6)
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0018_arb_self_types.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0018_arb_self_types.txt
index b2f04ea7bb..03139f7a49 100644
--- a/crates/ra_syntax/tests/data/parser/inline/ok/0018_arb_self_types.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/ok/0018_arb_self_types.txt
@@ -1,5 +1,5 @@
 SOURCE_FILE@[0; 69)
-  IMPL_ITEM@[0; 68)
+  IMPL_BLOCK@[0; 68)
     IMPL_KW@[0; 4)
     WHITESPACE@[4; 5)
     PATH_TYPE@[5; 6)
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0021_impl_item_list.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0021_impl_item_list.txt
index b15f93cd2a..50426bdfec 100644
--- a/crates/ra_syntax/tests/data/parser/inline/ok/0021_impl_item_list.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/ok/0021_impl_item_list.txt
@@ -1,5 +1,5 @@
 SOURCE_FILE@[0; 89)
-  IMPL_ITEM@[0; 88)
+  IMPL_BLOCK@[0; 88)
     IMPL_KW@[0; 4)
     WHITESPACE@[4; 5)
     PATH_TYPE@[5; 6)
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0047_unsafe_default_impl.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0047_unsafe_default_impl.txt
index 6003ba645b..5d68e88d6f 100644
--- a/crates/ra_syntax/tests/data/parser/inline/ok/0047_unsafe_default_impl.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/ok/0047_unsafe_default_impl.txt
@@ -1,5 +1,5 @@
 SOURCE_FILE@[0; 27)
-  IMPL_ITEM@[0; 26)
+  IMPL_BLOCK@[0; 26)
     UNSAFE_KW@[0; 6)
     WHITESPACE@[6; 7)
     DEFAULT_KW@[7; 14)
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0063_impl_item_neg.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0063_impl_item_neg.txt
index b83db380ec..563e435080 100644
--- a/crates/ra_syntax/tests/data/parser/inline/ok/0063_impl_item_neg.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/ok/0063_impl_item_neg.txt
@@ -1,5 +1,5 @@
 SOURCE_FILE@[0; 20)
-  IMPL_ITEM@[0; 19)
+  IMPL_BLOCK@[0; 19)
     IMPL_KW@[0; 4)
     WHITESPACE@[4; 5)
     EXCL@[5; 6)
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0079_impl_item.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0079_impl_item.txt
index 1b9a8aa0e5..a2c218aa9f 100644
--- a/crates/ra_syntax/tests/data/parser/inline/ok/0079_impl_item.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/ok/0079_impl_item.txt
@@ -1,5 +1,5 @@
 SOURCE_FILE@[0; 12)
-  IMPL_ITEM@[0; 11)
+  IMPL_BLOCK@[0; 11)
     IMPL_KW@[0; 4)
     WHITESPACE@[4; 5)
     PATH_TYPE@[5; 8)
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0087_unsafe_impl.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0087_unsafe_impl.txt
index f9c96c2429..d93c0df4d1 100644
--- a/crates/ra_syntax/tests/data/parser/inline/ok/0087_unsafe_impl.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/ok/0087_unsafe_impl.txt
@@ -1,5 +1,5 @@
 SOURCE_FILE@[0; 19)
-  IMPL_ITEM@[0; 18)
+  IMPL_BLOCK@[0; 18)
     UNSAFE_KW@[0; 6)
     WHITESPACE@[6; 7)
     IMPL_KW@[7; 11)
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0097_default_impl.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0097_default_impl.txt
index f45b6251fa..0b9af800bd 100644
--- a/crates/ra_syntax/tests/data/parser/inline/ok/0097_default_impl.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/ok/0097_default_impl.txt
@@ -1,5 +1,5 @@
 SOURCE_FILE@[0; 20)
-  IMPL_ITEM@[0; 19)
+  IMPL_BLOCK@[0; 19)
     DEFAULT_KW@[0; 7)
     WHITESPACE@[7; 8)
     IMPL_KW@[8; 12)
diff --git a/crates/ra_syntax/tests/data/parser/ok/0037_mod.txt b/crates/ra_syntax/tests/data/parser/ok/0037_mod.txt
index e11c4a06df..f8a20ac53f 100644
--- a/crates/ra_syntax/tests/data/parser/ok/0037_mod.txt
+++ b/crates/ra_syntax/tests/data/parser/ok/0037_mod.txt
@@ -14,4 +14,3 @@ SOURCE_FILE@[0; 93)
     ITEM_LIST@[91; 93)
       L_CURLY@[91; 92)
       R_CURLY@[92; 93)
-