]> git.lizzy.rs Git - rust.git/blob - tests/ui/inference/issue-103587.stderr
Rollup merge of #107348 - lcnr:project-solve-new, r=compiler-errors
[rust.git] / tests / ui / inference / issue-103587.stderr
1 error: expected `=`, found `==`
2   --> $DIR/issue-103587.rs:4:20
3    |
4 LL |     if let Some(_) == x {}
5    |                    ^^
6    |
7 help: consider using `=` here
8    |
9 LL |     if let Some(_) = x {}
10    |                    ~
11
12 error[E0308]: mismatched types
13   --> $DIR/issue-103587.rs:7:8
14    |
15 LL |     if Some(_) = x {}
16    |        ^^^^^^^^^^^ expected `bool`, found `()`
17    |
18 help: consider adding `let`
19    |
20 LL |     if let Some(_) = x {}
21    |        +++
22
23 error[E0308]: mismatched types
24   --> $DIR/issue-103587.rs:10:8
25    |
26 LL |     if None = x { }
27    |        ^^^^^^^^ expected `bool`, found `()`
28    |
29 help: you might have meant to use pattern matching
30    |
31 LL |     if let None = x { }
32    |        +++
33 help: you might have meant to compare for equality
34    |
35 LL |     if None == x { }
36    |              +
37
38 error: aborting due to 3 previous errors
39
40 For more information about this error, try `rustc --explain E0308`.