reformat
This commit is contained in:
parent
53ae63835d
commit
0270b4bc57
@ -103,7 +103,7 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul
|
||||
p.bump_remap(T![auto]);
|
||||
has_mods = true;
|
||||
}
|
||||
if p.at(IDENT) && p.at_contextual_kw("default") && p.nth(1) == T![impl ] {
|
||||
if p.at(IDENT) && p.at_contextual_kw("default") && p.nth(1) == T![impl] {
|
||||
p.bump_remap(T![default]);
|
||||
has_mods = true;
|
||||
}
|
||||
@ -161,7 +161,7 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul
|
||||
|
||||
// test unsafe_default_impl
|
||||
// unsafe default impl Foo {}
|
||||
T![impl ] => {
|
||||
T![impl] => {
|
||||
traits::impl_block(p);
|
||||
m.complete(p, IMPL_BLOCK);
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ pub(crate) fn trait_item_list(p: &mut Parser) {
|
||||
// test impl_block
|
||||
// impl Foo {}
|
||||
pub(super) fn impl_block(p: &mut Parser) {
|
||||
assert!(p.at(T![impl ]));
|
||||
assert!(p.at(T![impl]));
|
||||
p.bump();
|
||||
if choose_type_params_over_qpath(p) {
|
||||
type_params::opt_type_param_list(p);
|
||||
@ -130,7 +130,7 @@ fn choose_type_params_over_qpath(p: &Parser) -> bool {
|
||||
// impl impl NotType {}
|
||||
// impl Trait2 for impl NotType {}
|
||||
pub(crate) fn impl_type(p: &mut Parser) {
|
||||
if p.at(T![impl ]) {
|
||||
if p.at(T![impl]) {
|
||||
p.error("expected trait or type");
|
||||
return;
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ pub(super) fn opt_where_clause(p: &mut Parser) {
|
||||
fn is_where_predicate(p: &mut Parser) -> bool {
|
||||
match p.current() {
|
||||
LIFETIME => true,
|
||||
T![impl ] => false,
|
||||
T![impl] => false,
|
||||
token => types::TYPE_FIRST.contains(token),
|
||||
}
|
||||
}
|
||||
@ -170,7 +170,7 @@ fn where_predicate(p: &mut Parser) {
|
||||
p.error("expected colon");
|
||||
}
|
||||
}
|
||||
T![impl ] => {
|
||||
T![impl] => {
|
||||
p.error("expected lifetime or type");
|
||||
}
|
||||
_ => {
|
||||
|
@ -25,7 +25,7 @@ fn type_with_bounds_cond(p: &mut Parser, allow_bounds: bool) {
|
||||
T![_] => placeholder_type(p),
|
||||
T![fn] | T![unsafe] | T![extern] => fn_pointer_type(p),
|
||||
T![for] => for_type(p),
|
||||
T![impl ] => impl_trait_type(p),
|
||||
T![impl] => impl_trait_type(p),
|
||||
T![dyn ] => dyn_trait_type(p),
|
||||
// Some path types are not allowed to have bounds (no plus)
|
||||
T![<] => path_type_(p, allow_bounds),
|
||||
@ -221,7 +221,7 @@ pub(super) fn for_type(p: &mut Parser) {
|
||||
// test impl_trait_type
|
||||
// type A = impl Iterator<Item=Foo<'a>> + 'a;
|
||||
fn impl_trait_type(p: &mut Parser) {
|
||||
assert!(p.at(T![impl ]));
|
||||
assert!(p.at(T![impl]));
|
||||
let m = p.start();
|
||||
p.bump();
|
||||
type_params::bounds_without_colon(p);
|
||||
|
Loading…
x
Reference in New Issue
Block a user