]> git.lizzy.rs Git - rust.git/blob - src/test/ui/did_you_mean/issue-103909.stderr
Auto merge of #106025 - matthiaskrgr:rollup-vz5rqah, r=matthiaskrgr
[rust.git] / src / test / ui / did_you_mean / issue-103909.stderr
1 error[E0425]: cannot find value `err` in this scope
2   --> $DIR/issue-103909.rs:5:12
3    |
4 LL |     if Err(err) = File::open("hello.txt") {
5    |            ^^^ not found in this scope
6    |
7 help: you might have meant to use pattern matching
8    |
9 LL |     if let Err(err) = File::open("hello.txt") {
10    |        +++
11
12 error[E0308]: mismatched types
13   --> $DIR/issue-103909.rs:5:8
14    |
15 LL |     if Err(err) = File::open("hello.txt") {
16    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `()`
17    |
18 help: consider adding `let`
19    |
20 LL |     if let Err(err) = File::open("hello.txt") {
21    |        +++
22
23 error: aborting due to 2 previous errors
24
25 Some errors have detailed explanations: E0308, E0425.
26 For more information about an error, try `rustc --explain E0308`.