mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
fix: never type with binding
Change-Id: I14e1bc628b9d2dfdb1f40de3d3707f4e872767f2
This commit is contained in:
parent
8ba5617613
commit
205a8278a9
4 changed files with 42 additions and 8 deletions
|
@ -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]));
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue