mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 05:38:46 +00:00
Drop more high-order stuff
This commit is contained in:
parent
410f948c5f
commit
111743d82c
1 changed files with 11 additions and 12 deletions
|
@ -22,7 +22,7 @@ fn item(p: &mut Parser){
|
||||||
err_token => {
|
err_token => {
|
||||||
p.start(ERROR);
|
p.start(ERROR);
|
||||||
let message = if err_token == SEMI {
|
let message = if err_token == SEMI {
|
||||||
//TODO: if the item is incomplete, this messsage is misleading
|
//TODO: if the item is incomplete, this message is misleading
|
||||||
"expected item, found `;`\n\
|
"expected item, found `;`\n\
|
||||||
consider removing this semicolon"
|
consider removing this semicolon"
|
||||||
} else {
|
} else {
|
||||||
|
@ -97,13 +97,12 @@ fn named_fields(p: &mut Parser) {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
fn named_field(p: &mut Parser) {
|
fn named_field(p: &mut Parser) {
|
||||||
node(p, NAMED_FIELD, |p| {
|
p.start(NAMED_FIELD);
|
||||||
visibility(p);
|
visibility(p);
|
||||||
p.expect(IDENT) && p.expect(COLON) && {
|
if p.expect(IDENT) && p.expect(COLON) {
|
||||||
types::type_ref(p);
|
types::type_ref(p);
|
||||||
true
|
};
|
||||||
};
|
p.finish()
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,10 +117,10 @@ fn tuple_fields(p: &mut Parser) {
|
||||||
p.expect(R_PAREN);
|
p.expect(R_PAREN);
|
||||||
|
|
||||||
fn tuple_field(p: &mut Parser) {
|
fn tuple_field(p: &mut Parser) {
|
||||||
node(p, POS_FIELD, |p| {
|
p.start(POS_FIELD);
|
||||||
visibility(p);
|
visibility(p);
|
||||||
types::type_ref(p);
|
types::type_ref(p);
|
||||||
})
|
p.finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue