]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/issue-104086-suggest-let.rs
Rollup merge of #107632 - ameknite:issue-107622-fix, r=jyn514
[rust.git] / tests / ui / suggestions / issue-104086-suggest-let.rs
1 fn main() {
2     x = x = x;
3     //~^ ERROR cannot find value `x` in this scope
4     //~| ERROR cannot find value `x` in this scope
5     //~| ERROR cannot find value `x` in this scope
6
7     x = y = y = y;
8     //~^ ERROR cannot find value `y` in this scope
9     //~| ERROR cannot find value `y` in this scope
10     //~| ERROR cannot find value `y` in this scope
11     //~| ERROR cannot find value `x` in this scope
12
13     x = y = y;
14     //~^ ERROR cannot find value `x` in this scope
15     //~| ERROR cannot find value `y` in this scope
16     //~| ERROR cannot find value `y` in this scope
17
18     x = x = y;
19     //~^ ERROR cannot find value `x` in this scope
20     //~| ERROR cannot find value `x` in this scope
21     //~| ERROR cannot find value `y` in this scope
22
23     x = x; // will suggest add `let`
24     //~^ ERROR cannot find value `x` in this scope
25     //~| ERROR cannot find value `x` in this scope
26
27     x = y // will suggest add `let`
28     //~^ ERROR cannot find value `x` in this scope
29     //~| ERROR cannot find value `y` in this scope
30 }