mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 13:48:50 +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::*;
|
use super::*;
|
||||||
|
|
||||||
pub(super) fn static_item(p: &mut Parser) {
|
pub(super) fn static_def(p: &mut Parser) {
|
||||||
const_or_static(p, STATIC_KW)
|
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)
|
const_or_static(p, CONST_KW)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ pub(super) fn maybe_item(p: &mut Parser) -> MaybeItem {
|
||||||
// test unsafe_auto_trait
|
// test unsafe_auto_trait
|
||||||
// unsafe auto trait T {}
|
// unsafe auto trait T {}
|
||||||
TRAIT_KW => {
|
TRAIT_KW => {
|
||||||
traits::trait_item(p);
|
traits::trait_def(p);
|
||||||
TRAIT_DEF
|
TRAIT_DEF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ fn items_without_modifiers(p: &mut Parser) -> Option<SyntaxKind> {
|
||||||
EXTERN_CRATE_ITEM
|
EXTERN_CRATE_ITEM
|
||||||
}
|
}
|
||||||
TYPE_KW => {
|
TYPE_KW => {
|
||||||
type_item(p);
|
type_def(p);
|
||||||
TYPE_DEF
|
TYPE_DEF
|
||||||
}
|
}
|
||||||
MOD_KW => {
|
MOD_KW => {
|
||||||
|
@ -164,7 +164,7 @@ fn items_without_modifiers(p: &mut Parser) -> Option<SyntaxKind> {
|
||||||
MODULE
|
MODULE
|
||||||
}
|
}
|
||||||
STRUCT_KW => {
|
STRUCT_KW => {
|
||||||
structs::struct_item(p);
|
structs::struct_def(p);
|
||||||
if p.at(SEMI) {
|
if p.at(SEMI) {
|
||||||
p.err_and_bump(
|
p.err_and_bump(
|
||||||
"expected item, found `;`\n\
|
"expected item, found `;`\n\
|
||||||
|
@ -174,7 +174,7 @@ fn items_without_modifiers(p: &mut Parser) -> Option<SyntaxKind> {
|
||||||
STRUCT_DEF
|
STRUCT_DEF
|
||||||
}
|
}
|
||||||
ENUM_KW => {
|
ENUM_KW => {
|
||||||
structs::enum_item(p);
|
structs::enum_def(p);
|
||||||
ENUM_DEF
|
ENUM_DEF
|
||||||
}
|
}
|
||||||
USE_KW => {
|
USE_KW => {
|
||||||
|
@ -182,11 +182,11 @@ fn items_without_modifiers(p: &mut Parser) -> Option<SyntaxKind> {
|
||||||
USE_ITEM
|
USE_ITEM
|
||||||
}
|
}
|
||||||
CONST_KW if (la == IDENT || la == MUT_KW) => {
|
CONST_KW if (la == IDENT || la == MUT_KW) => {
|
||||||
consts::const_item(p);
|
consts::const_def(p);
|
||||||
CONST_DEF
|
CONST_DEF
|
||||||
}
|
}
|
||||||
STATIC_KW => {
|
STATIC_KW => {
|
||||||
consts::static_item(p);
|
consts::static_def(p);
|
||||||
STATIC_DEF
|
STATIC_DEF
|
||||||
}
|
}
|
||||||
// test extern_block
|
// test extern_block
|
||||||
|
@ -249,7 +249,7 @@ fn function(p: &mut Parser) {
|
||||||
|
|
||||||
// test type_item
|
// test type_item
|
||||||
// type Foo = Bar;
|
// type Foo = Bar;
|
||||||
fn type_item(p: &mut Parser) {
|
fn type_def(p: &mut Parser) {
|
||||||
assert!(p.at(TYPE_KW));
|
assert!(p.at(TYPE_KW));
|
||||||
p.bump();
|
p.bump();
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
pub(super) fn struct_item(p: &mut Parser) {
|
pub(super) fn struct_def(p: &mut Parser) {
|
||||||
assert!(p.at(STRUCT_KW));
|
assert!(p.at(STRUCT_KW));
|
||||||
p.bump();
|
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));
|
assert!(p.at(ENUM_KW));
|
||||||
p.bump();
|
p.bump();
|
||||||
name(p);
|
name(p);
|
||||||
|
|
|
@ -2,7 +2,7 @@ use super::*;
|
||||||
|
|
||||||
// test trait_item
|
// test trait_item
|
||||||
// trait T<U>: Hash + Clone where U: Copy {}
|
// 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));
|
assert!(p.at(TRAIT_KW));
|
||||||
p.bump();
|
p.bump();
|
||||||
name(p);
|
name(p);
|
||||||
|
|
Loading…
Reference in a new issue