]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error: expected identifier, found keyword `let` |
0731742a | 2 | --> $DIR/try-block-in-edition2015.rs:6:9 |
b7449926 XL |
3 | | |
4 | LL | let try_result: Option<_> = try { | |
5 | | --- while parsing this struct | |
532ac7d7 XL |
6 | LL | |
7 | LL | let x = 5; | |
b7449926 XL |
8 | | ^^^ expected identifier, found keyword |
9 | ||
10 | error[E0574]: expected struct, variant or union type, found macro `try` | |
0731742a | 11 | --> $DIR/try-block-in-edition2015.rs:4:33 |
b7449926 XL |
12 | | |
13 | LL | let try_result: Option<_> = try { | |
3dfed10e | 14 | | ^^^ not a struct, variant or union type |
9fa01778 | 15 | | |
5869c6ff | 16 | = note: if you want the `try` keyword, you need Rust 2018 or later |
ba9703b0 XL |
17 | help: use `!` to invoke the macro |
18 | | | |
19 | LL | let try_result: Option<_> = try! { | |
94222f64 | 20 | | + |
b7449926 XL |
21 | |
22 | error: aborting due to 2 previous errors | |
23 | ||
e74abb32 | 24 | For more information about this error, try `rustc --explain E0574`. |