1 error[E0425]: cannot find value `err` in this scope
2 --> $DIR/issue-103909.rs:5:12
4 LL | if Err(err) = File::open("hello.txt") {
5 | ^^^ not found in this scope
7 help: you might have meant to use pattern matching
9 LL | if let Err(err) = File::open("hello.txt") {
12 error[E0308]: mismatched types
13 --> $DIR/issue-103909.rs:5:8
15 LL | if Err(err) = File::open("hello.txt") {
16 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `()`
18 help: consider adding `let`
20 LL | if let Err(err) = File::open("hello.txt") {
23 error: aborting due to 2 previous errors
25 Some errors have detailed explanations: E0308, E0425.
26 For more information about an error, try `rustc --explain E0308`.