]>
Commit | Line | Data |
---|---|---|
923072b8 FG |
1 | // FIXME(compiler-errors): This really should suggest `let` on the RHS of the |
2 | // `&&` operator, but that's kinda hard to do because of precedence. | |
3 | // Instead, for now we just make sure not to suggest `if let let`. | |
4 | fn a() { | |
5 | if let x = 1 && i = 2 {} | |
6 | //~^ ERROR cannot find value `i` in this scope | |
7 | //~| ERROR `let` expressions in this position are unstable | |
8 | //~| ERROR mismatched types | |
9 | //~| ERROR `let` expressions are not supported here | |
10 | } | |
11 | ||
12 | fn b() { | |
13 | if (i + j) = i {} | |
14 | //~^ ERROR cannot find value `i` in this scope | |
15 | //~| ERROR cannot find value `i` in this scope | |
16 | //~| ERROR cannot find value `j` in this scope | |
17 | } | |
18 | ||
19 | fn c() { | |
20 | if x[0] = 1 {} | |
21 | //~^ ERROR cannot find value `x` in this scope | |
22 | } | |
23 | ||
24 | fn main() {} |