fix: never type with binding

Change-Id: I14e1bc628b9d2dfdb1f40de3d3707f4e872767f2
This commit is contained in:
csmoe 2019-06-07 19:49:49 +08:00
parent 8ba5617613
commit 205a8278a9
4 changed files with 42 additions and 8 deletions

View file

@ -137,12 +137,14 @@ pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) {
m.complete(p, EXPR_STMT);
}
// test let_stmt;
// test let_stmt
// fn foo() {
// let a;
// let b: i32;
// let c = 92;
// let d: i32 = 92;
// let e: !;
// let _: ! = {};
// }
fn let_stmt(p: &mut Parser, m: Marker, with_semi: StmtWithSemi) {
assert!(p.at(T![let]));

View file

@ -272,7 +272,7 @@ impl<'t> Parser<'t> {
T![=] if jn1 && la2 == T![=] => Some((T![==], 2)),
T![=] if jn1 && la2 == T![>] => Some((T![=>], 2)),
T![!] if la2 == T![=] => Some((T![!=], 2)),
T![!] if jn1 && la2 == T![=] => Some((T![!=], 2)),
T![-] if la2 == T![>] => Some((T![->], 2)),
_ => None,
}