]> git.lizzy.rs Git - rust.git/blob - src/test/ui/try-block/try-block-in-edition2015.stderr
Rollup merge of #57720 - dlrobertson:fix_57521, r=estebank
[rust.git] / src / test / ui / try-block / try-block-in-edition2015.stderr
1 error: expected identifier, found keyword `let`
2   --> $DIR/try-block-in-edition2015.rs:6:9
3    |
4 LL |     let try_result: Option<_> = try {
5    |                                 --- while parsing this struct
6 LL |     //~^ ERROR expected struct, variant or union type, found macro `try`
7 LL |         let x = 5; //~ ERROR expected identifier, found keyword
8    |         ^^^ expected identifier, found keyword
9 help: you can escape reserved keywords to use them as identifiers
10    |
11 LL |         r#let x = 5; //~ ERROR expected identifier, found keyword
12    |         ^^^^^
13
14 error[E0574]: expected struct, variant or union type, found macro `try`
15   --> $DIR/try-block-in-edition2015.rs:4:33
16    |
17 LL |     let try_result: Option<_> = try {
18    |                                 ^^^ help: use `!` to invoke the macro: `try!`
19
20 error: aborting due to 2 previous errors
21
22 For more information about this error, try `rustc --explain E0574`.