Rename ast::ImplBlock -> ast::ImplDef

This commit is contained in:
Aleksey Kladov
2020-02-29 21:24:40 +01:00
parent f316e074d2
commit a1e1869554
68 changed files with 216 additions and 224 deletions

View File

@@ -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,

View File

@@ -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

View File

@@ -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);

View File

@@ -133,7 +133,7 @@ pub enum SyntaxKind {
STATIC_DEF,
CONST_DEF,
TRAIT_DEF,
IMPL_BLOCK,
IMPL_DEF,
TYPE_ALIAS_DEF,
MACRO_CALL,
TOKEN_TREE,