diff --git a/crates/libsyntax2/src/grammar/items/consts.rs b/crates/libsyntax2/src/grammar/items/consts.rs index b11949b494..5a5852f83a 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 c3893937a7..883b5a946c 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 67616eaadb..80e77edd35 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 0b9fb2b0b2..53a636f6ca 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);