Adhere to tidy script
This commit is contained in:
parent
4a938b5b3c
commit
de02dd96fd
@ -3619,7 +3619,8 @@ impl<'a> Parser<'a> {
|
||||
let (iattrs, body) = self.parse_inner_attrs_and_block()?;
|
||||
attrs.extend(iattrs);
|
||||
if self.eat_keyword(keywords::Catch) {
|
||||
let mut error = self.struct_span_err(self.prev_span, "`try {} catch` is not a valid syntax");
|
||||
let mut error = self.struct_span_err(self.prev_span,
|
||||
"`try {} catch` is not a valid syntax");
|
||||
error.help("try using `match` on the result of the `try` block instead");
|
||||
Err(error)
|
||||
} else {
|
||||
|
@ -3,7 +3,7 @@
|
||||
#![feature(try_blocks)]
|
||||
|
||||
fn main() {
|
||||
let res: Option<bool> = try {
|
||||
true
|
||||
} catch { }; //~ ERROR `try {} catch` is not a valid syntax
|
||||
let res: Option<bool> = try {
|
||||
true
|
||||
} catch { }; //~ ERROR `try {} catch` is not a valid syntax
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user