mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 17:53:56 +00:00
renames
This commit is contained in:
parent
6953049e5f
commit
d1400e95d7
@ -172,7 +172,7 @@ fn tuple_expr(p: &mut Parser) -> CompletedMarker {
|
||||
fn lambda_expr(p: &mut Parser) -> CompletedMarker {
|
||||
assert!(p.at(PIPE));
|
||||
let m = p.start();
|
||||
params::list_opt_types(p);
|
||||
params::param_list_opt_types(p);
|
||||
if fn_ret_type(p) {
|
||||
block(p);
|
||||
} else {
|
||||
|
@ -236,10 +236,10 @@ fn fn_item(p: &mut Parser) {
|
||||
name(p);
|
||||
// test fn_item_type_params
|
||||
// fn foo<T: Clone + Copy>(){}
|
||||
type_params::list(p);
|
||||
type_params::type_param_list(p);
|
||||
|
||||
if p.at(L_PAREN) {
|
||||
params::list(p);
|
||||
params::param_list(p);
|
||||
} else {
|
||||
p.error("expected function arguments");
|
||||
}
|
||||
@ -265,7 +265,7 @@ fn type_item(p: &mut Parser) {
|
||||
|
||||
// test type_item_type_params
|
||||
// type Result<T> = ();
|
||||
type_params::list(p);
|
||||
type_params::type_param_list(p);
|
||||
|
||||
// test type_item_where_clause
|
||||
// type Foo where Foo: Copy = ();
|
||||
|
@ -5,7 +5,7 @@ pub(super) fn struct_item(p: &mut Parser) {
|
||||
p.bump();
|
||||
|
||||
name(p);
|
||||
type_params::list(p);
|
||||
type_params::type_param_list(p);
|
||||
match p.current() {
|
||||
WHERE_KW => {
|
||||
type_params::where_clause(p);
|
||||
@ -42,7 +42,7 @@ pub(super) fn enum_item(p: &mut Parser) {
|
||||
assert!(p.at(ENUM_KW));
|
||||
p.bump();
|
||||
name(p);
|
||||
type_params::list(p);
|
||||
type_params::type_param_list(p);
|
||||
type_params::where_clause(p);
|
||||
if p.expect(L_CURLY) {
|
||||
while !p.at(EOF) && !p.at(R_CURLY) {
|
||||
|
@ -6,7 +6,7 @@ pub(super) fn trait_item(p: &mut Parser) {
|
||||
assert!(p.at(TRAIT_KW));
|
||||
p.bump();
|
||||
name(p);
|
||||
type_params::list(p);
|
||||
type_params::type_param_list(p);
|
||||
if p.at(COLON) {
|
||||
type_params::bounds(p);
|
||||
}
|
||||
@ -21,7 +21,7 @@ pub(super) fn impl_item(p: &mut Parser) {
|
||||
assert!(p.at(IMPL_KW));
|
||||
p.bump();
|
||||
if choose_type_params_over_qpath(p) {
|
||||
type_params::list(p);
|
||||
type_params::type_param_list(p);
|
||||
}
|
||||
|
||||
// TODO: never type
|
||||
|
@ -5,11 +5,11 @@ use super::*;
|
||||
// fn b(x: i32) {}
|
||||
// fn c(x: i32, ) {}
|
||||
// fn d(x: i32, y: ()) {}
|
||||
pub(super) fn list(p: &mut Parser) {
|
||||
pub(super) fn param_list(p: &mut Parser) {
|
||||
list_(p, true)
|
||||
}
|
||||
|
||||
pub(super) fn list_opt_types(p: &mut Parser) {
|
||||
pub(super) fn param_list_opt_types(p: &mut Parser) {
|
||||
list_(p, false)
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ fn path_segment(p: &mut Parser, mode: Mode, first: bool) {
|
||||
fn path_generic_args(p: &mut Parser, mode: Mode) {
|
||||
match mode {
|
||||
Mode::Use => return,
|
||||
Mode::Type => type_args::list(p, false),
|
||||
Mode::Expr => type_args::list(p, true),
|
||||
Mode::Type => type_args::type_arg_list(p, false),
|
||||
Mode::Expr => type_args::type_arg_list(p, true),
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
use super::*;
|
||||
|
||||
pub(super) fn list(p: &mut Parser, colon_colon_required: bool) {
|
||||
pub(super) fn type_arg_list(p: &mut Parser, colon_colon_required: bool) {
|
||||
let m;
|
||||
match (colon_colon_required, p.nth(0), p.nth(1)) {
|
||||
(_, COLONCOLON, L_ANGLE) => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
use super::*;
|
||||
|
||||
pub(super) fn list(p: &mut Parser) {
|
||||
pub(super) fn type_param_list(p: &mut Parser) {
|
||||
if !p.at(L_ANGLE) {
|
||||
return;
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ fn fn_pointer_type(p: &mut Parser) {
|
||||
return;
|
||||
}
|
||||
|
||||
params::list(p);
|
||||
params::param_list(p);
|
||||
// test fn_pointer_type_with_ret
|
||||
// type F = fn() -> ();
|
||||
fn_ret_type(p);
|
||||
@ -179,7 +179,7 @@ fn for_type(p: &mut Parser) {
|
||||
assert!(p.at(FOR_KW));
|
||||
let m = p.start();
|
||||
p.bump();
|
||||
type_params::list(p);
|
||||
type_params::type_param_list(p);
|
||||
type_(p);
|
||||
m.complete(p, FOR_TYPE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user