Skip to content

Commit c7b5c52

Browse files
committed
Remove do catch
1 parent 307ea60 commit c7b5c52

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/libsyntax/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#![feature(str_escape)]
2929
#![feature(try_trait)]
3030
#![feature(unicode_internals)]
31-
#![feature(catch_expr)]
3231

3332
#![recursion_limit="256"]
3433

src/libsyntax/parse/parser.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -2081,12 +2081,12 @@ impl<'a> Parser<'a> {
20812081

20822082
let args = if self.eat_lt() {
20832083
// `<'a, T, A = U>`
2084-
let args: PResult<_> = do catch {
2085-
let (args, bindings) = self.parse_generic_args()?;
2086-
self.expect_gt()?;
2087-
let span = lo.to(self.prev_span);
2088-
AngleBracketedArgs { args, bindings, span }
2089-
};
2084+
let args: PResult<_> = self.parse_generic_args().and_then(|(args, bindings)| {
2085+
self.expect_gt().and_then(|_| {
2086+
let span = lo.to(self.prev_span);
2087+
Ok(AngleBracketedArgs { args, bindings, span })
2088+
})
2089+
});
20902090

20912091
match args {
20922092
Err(mut err) => {

0 commit comments

Comments
 (0)