mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
show diagnostic for } token followed by else in let else statement
This commit is contained in:
parent
31c12ec282
commit
995aacfce8
5 changed files with 101 additions and 8 deletions
|
@ -188,7 +188,7 @@ fn tuple_expr(p: &mut Parser<'_>) -> CompletedMarker {
|
|||
|
||||
// test tuple_attrs
|
||||
// const A: (i64, i64) = (1, #[cfg(test)] 2);
|
||||
if !expr(p) {
|
||||
if expr(p).is_none() {
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -221,7 +221,7 @@ fn array_expr(p: &mut Parser<'_>) -> CompletedMarker {
|
|||
|
||||
// test array_attrs
|
||||
// const A: &[i64] = &[1, #[cfg(test)] 2];
|
||||
if !expr(p) {
|
||||
if expr(p).is_none() {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue