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> {
36193619 let ( iattrs, body) = self . parse_inner_attrs_and_block ( ) ?;
36203620 attrs. extend ( iattrs) ;
36213621 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" ) ;
36233624 error. help ( "try using `match` on the result of the `try` block instead" ) ;
36243625 Err ( error)
36253626 } else {
Original file line number Diff line number Diff line change 33#![ feature( try_blocks) ]
44
55fn 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
99}
You can’t perform that action at this time.
0 commit comments