mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 12:33:33 +00:00
More renames
This commit is contained in:
parent
d642c48616
commit
1d95f34e9a
4 changed files with 12 additions and 12 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
@ -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<SyntaxKind> {
|
|||
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<SyntaxKind> {
|
|||
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<SyntaxKind> {
|
|||
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<SyntaxKind> {
|
|||
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();
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -2,7 +2,7 @@ use super::*;
|
|||
|
||||
// test trait_item
|
||||
// trait T<U>: 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);
|
||||
|
|
Loading…
Reference in a new issue