From 1d95f34e9a1b2b7cebf44e38238b50a693d3394b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 13 Aug 2018 18:34:02 +0300 Subject: More renames --- crates/libsyntax2/src/grammar/items/consts.rs | 4 ++-- crates/libsyntax2/src/grammar/items/mod.rs | 14 +++++++------- crates/libsyntax2/src/grammar/items/structs.rs | 4 ++-- crates/libsyntax2/src/grammar/items/traits.rs | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'crates/libsyntax2/src/grammar') diff --git a/crates/libsyntax2/src/grammar/items/consts.rs b/crates/libsyntax2/src/grammar/items/consts.rs index b11949b49..5a5852f83 100644 --- a/crates/libsyntax2/src/grammar/items/consts.rs +++ b/crates/libsyntax2/src/grammar/items/consts.rs @@ -1,10 +1,10 @@ use super::*; -pub(super) fn static_item(p: &mut Parser) { +pub(super) fn static_def(p: &mut Parser) { const_or_static(p, STATIC_KW) } -pub(super) fn const_item(p: &mut Parser) { +pub(super) fn const_def(p: &mut Parser) { const_or_static(p, CONST_KW) } diff --git a/crates/libsyntax2/src/grammar/items/mod.rs b/crates/libsyntax2/src/grammar/items/mod.rs index c3893937a..883b5a946 100644 --- a/crates/libsyntax2/src/grammar/items/mod.rs +++ b/crates/libsyntax2/src/grammar/items/mod.rs @@ -120,7 +120,7 @@ pub(super) fn maybe_item(p: &mut Parser) -> MaybeItem { // test unsafe_auto_trait // unsafe auto trait T {} TRAIT_KW => { - traits::trait_item(p); + traits::trait_def(p); TRAIT_DEF } @@ -156,7 +156,7 @@ fn items_without_modifiers(p: &mut Parser) -> Option { EXTERN_CRATE_ITEM } TYPE_KW => { - type_item(p); + type_def(p); TYPE_DEF } MOD_KW => { @@ -164,7 +164,7 @@ fn items_without_modifiers(p: &mut Parser) -> Option { MODULE } STRUCT_KW => { - structs::struct_item(p); + structs::struct_def(p); if p.at(SEMI) { p.err_and_bump( "expected item, found `;`\n\ @@ -174,7 +174,7 @@ fn items_without_modifiers(p: &mut Parser) -> Option { STRUCT_DEF } ENUM_KW => { - structs::enum_item(p); + structs::enum_def(p); ENUM_DEF } USE_KW => { @@ -182,11 +182,11 @@ fn items_without_modifiers(p: &mut Parser) -> Option { USE_ITEM } CONST_KW if (la == IDENT || la == MUT_KW) => { - consts::const_item(p); + consts::const_def(p); CONST_DEF } STATIC_KW => { - consts::static_item(p); + consts::static_def(p); STATIC_DEF } // test extern_block @@ -249,7 +249,7 @@ fn function(p: &mut Parser) { // test type_item // type Foo = Bar; -fn type_item(p: &mut Parser) { +fn type_def(p: &mut Parser) { assert!(p.at(TYPE_KW)); p.bump(); diff --git a/crates/libsyntax2/src/grammar/items/structs.rs b/crates/libsyntax2/src/grammar/items/structs.rs index 67616eaad..80e77edd3 100644 --- a/crates/libsyntax2/src/grammar/items/structs.rs +++ b/crates/libsyntax2/src/grammar/items/structs.rs @@ -1,6 +1,6 @@ use super::*; -pub(super) fn struct_item(p: &mut Parser) { +pub(super) fn struct_def(p: &mut Parser) { assert!(p.at(STRUCT_KW)); p.bump(); @@ -38,7 +38,7 @@ pub(super) fn struct_item(p: &mut Parser) { } } -pub(super) fn enum_item(p: &mut Parser) { +pub(super) fn enum_def(p: &mut Parser) { assert!(p.at(ENUM_KW)); p.bump(); name(p); diff --git a/crates/libsyntax2/src/grammar/items/traits.rs b/crates/libsyntax2/src/grammar/items/traits.rs index 0b9fb2b0b..53a636f6c 100644 --- a/crates/libsyntax2/src/grammar/items/traits.rs +++ b/crates/libsyntax2/src/grammar/items/traits.rs @@ -2,7 +2,7 @@ use super::*; // test trait_item // trait T: Hash + Clone where U: Copy {} -pub(super) fn trait_item(p: &mut Parser) { +pub(super) fn trait_def(p: &mut Parser) { assert!(p.at(TRAIT_KW)); p.bump(); name(p); -- cgit v1.2.3