From a1e18695548b5cd6661f26a985b34c8b105e1896 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 29 Feb 2020 21:24:40 +0100 Subject: Rename ast::ImplBlock -> ast::ImplDef --- crates/ra_parser/src/grammar.rs | 2 +- crates/ra_parser/src/grammar/items.rs | 4 ++-- crates/ra_parser/src/grammar/items/traits.rs | 6 +++--- crates/ra_parser/src/syntax_kind/generated.rs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'crates/ra_parser/src') diff --git a/crates/ra_parser/src/grammar.rs b/crates/ra_parser/src/grammar.rs index a46e11e1d..58098e810 100644 --- a/crates/ra_parser/src/grammar.rs +++ b/crates/ra_parser/src/grammar.rs @@ -152,7 +152,7 @@ pub(crate) fn reparser( EXTERN_ITEM_LIST => items::extern_item_list, TOKEN_TREE if first_child? == T!['{'] => items::token_tree, ITEM_LIST => match parent? { - IMPL_BLOCK => items::impl_item_list, + IMPL_DEF => items::impl_item_list, TRAIT_DEF => items::trait_item_list, MODULE => items::mod_item_list, _ => return None, diff --git a/crates/ra_parser/src/grammar/items.rs b/crates/ra_parser/src/grammar/items.rs index f8b43866c..433ed6812 100644 --- a/crates/ra_parser/src/grammar/items.rs +++ b/crates/ra_parser/src/grammar/items.rs @@ -202,8 +202,8 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul // test unsafe_default_impl // unsafe default impl Foo {} T![impl] => { - traits::impl_block(p); - m.complete(p, IMPL_BLOCK); + traits::impl_def(p); + m.complete(p, IMPL_DEF); } // test existential_type diff --git a/crates/ra_parser/src/grammar/items/traits.rs b/crates/ra_parser/src/grammar/items/traits.rs index 03dae3cdb..c819e33be 100644 --- a/crates/ra_parser/src/grammar/items/traits.rs +++ b/crates/ra_parser/src/grammar/items/traits.rs @@ -53,9 +53,9 @@ pub(crate) fn trait_item_list(p: &mut Parser) { m.complete(p, ITEM_LIST); } -// test impl_block +// test impl_def // impl Foo {} -pub(super) fn impl_block(p: &mut Parser) { +pub(super) fn impl_def(p: &mut Parser) { assert!(p.at(T![impl])); p.bump(T![impl]); if choose_type_params_over_qpath(p) { @@ -65,7 +65,7 @@ pub(super) fn impl_block(p: &mut Parser) { // FIXME: never type // impl ! {} - // test impl_block_neg + // test impl_def_neg // impl !Send for X {} p.eat(T![!]); impl_type(p); diff --git a/crates/ra_parser/src/syntax_kind/generated.rs b/crates/ra_parser/src/syntax_kind/generated.rs index 1068da0a0..dfc30d727 100644 --- a/crates/ra_parser/src/syntax_kind/generated.rs +++ b/crates/ra_parser/src/syntax_kind/generated.rs @@ -133,7 +133,7 @@ pub enum SyntaxKind { STATIC_DEF, CONST_DEF, TRAIT_DEF, - IMPL_BLOCK, + IMPL_DEF, TYPE_ALIAS_DEF, MACRO_CALL, TOKEN_TREE, -- cgit v1.2.3