File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -3619,7 +3619,8 @@ impl<'a> Parser<'a> {
3619
3619
let ( iattrs, body) = self . parse_inner_attrs_and_block ( ) ?;
3620
3620
attrs. extend ( iattrs) ;
3621
3621
if self . eat_keyword ( keywords:: Catch ) {
3622
- let mut error = self . struct_span_err ( self . prev_span , "`try {} catch` is not a valid syntax" ) ;
3622
+ let mut error = self . struct_span_err ( self . prev_span ,
3623
+ "`try {} catch` is not a valid syntax" ) ;
3623
3624
error. help ( "try using `match` on the result of the `try` block instead" ) ;
3624
3625
Err ( error)
3625
3626
} else {
Original file line number Diff line number Diff line change 3
3
#![ feature( try_blocks) ]
4
4
5
5
fn main ( ) {
6
- let res: Option < bool > = try {
7
- true
8
- } catch { } ; //~ ERROR `try {} catch` is not a valid syntax
6
+ let res: Option < bool > = try {
7
+ true
8
+ } catch { } ; //~ ERROR `try {} catch` is not a valid syntax
9
9
}
You can’t perform that action at this time.
0 commit comments