diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-06-07 21:58:45 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-07 21:58:45 -0400 |
| commit | aa536f4be3f420beb0080c1f73a90934a689bf87 (patch) | |
| tree | 299c1950b0bb6690c78f62883ff11e3971b173e7 /src/libsyntax/parse | |
| parent | 3ce88c7c8d3a422146bdc749c4e0207517b1f92a (diff) | |
| parent | ab72611d8f664684dbd5dd2efe6fd7edff53ee5d (diff) | |
| download | rust-aa536f4be3f420beb0080c1f73a90934a689bf87.tar.gz rust-aa536f4be3f420beb0080c1f73a90934a689bf87.zip | |
Rollup merge of #42497 - qnighy:just-use-try-in-three-places, r=eddyb
Replace some matches with try. This patch just replaces `match`es with `?` in the compiler, which I came across when I'm reading the parser.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index d9cb2b4ab7d..1e156ed07b0 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1249,10 +1249,7 @@ impl<'a> Parser<'a> { let mac = respan(lo.to(self.prev_span), Mac_ { path: pth, tts: tts }); (keywords::Invalid.ident(), ast::TraitItemKind::Macro(mac)) } else { - let (constness, unsafety, abi) = match self.parse_fn_front_matter() { - Ok(cua) => cua, - Err(e) => return Err(e), - }; + let (constness, unsafety, abi) = self.parse_fn_front_matter()?; let ident = self.parse_ident()?; let mut generics = self.parse_generics()?; |
