]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/while-let-typo.stderr
Make const/fn return params more suggestable
[rust.git] / tests / ui / suggestions / while-let-typo.stderr
1 error[E0425]: cannot find value `x` in this scope
2   --> $DIR/while-let-typo.rs:4:16
3    |
4 LL |     while Some(x) = foo {}
5    |                ^ not found in this scope
6    |
7 help: you might have meant to use pattern matching
8    |
9 LL |     while let Some(x) = foo {}
10    |           +++
11
12 error[E0425]: cannot find value `x` in this scope
13   --> $DIR/while-let-typo.rs:8:11
14    |
15 LL |     while x = 5 {}
16    |           ^ not found in this scope
17    |
18 help: you might have meant to use pattern matching
19    |
20 LL |     while let x = 5 {}
21    |           +++
22
23 error[E0308]: mismatched types
24   --> $DIR/while-let-typo.rs:6:11
25    |
26 LL |     while 3 = foo {}
27    |           ^^^^^^^ expected `bool`, found `()`
28
29 error[E0070]: invalid left-hand side of assignment
30   --> $DIR/while-let-typo.rs:7:19
31    |
32 LL |     while Some(3) = foo {}
33    |                -  ^
34    |                |
35    |                cannot assign to this expression
36    |
37 help: you might have meant to use pattern destructuring
38    |
39 LL |     while let Some(3) = foo {}
40    |           +++
41
42 error: aborting due to 4 previous errors
43
44 Some errors have detailed explanations: E0070, E0308, E0425.
45 For more information about an error, try `rustc --explain E0070`.