diff options
| author | bors <bors@rust-lang.org> | 2017-12-10 00:57:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-12-10 00:57:40 +0000 |
| commit | c89e206eedee079c4620eacbfb4e3bc6cf392fc8 (patch) | |
| tree | d362e737537921ce60a13c88139b708e63e29a01 /src/libsyntax/parse | |
| parent | 8db163e53dab4f188a60bf24b4d6ebeb1ea5cab1 (diff) | |
| parent | 3024c1434a667425d30e4b0785857381323712aa (diff) | |
| download | rust-c89e206eedee079c4620eacbfb4e3bc6cf392fc8.tar.gz rust-c89e206eedee079c4620eacbfb4e3bc6cf392fc8.zip | |
Auto merge of #46602 - mbrubeck:try, r=kennytm
Replace option_try macros and match with ? operator None
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/token.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index ff87f146c0a..26f39f60880 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -620,10 +620,7 @@ fn prepend_attrs(sess: &ParseSess, span: syntax_pos::Span) -> Option<tokenstream::TokenStream> { - let tokens = match tokens { - Some(tokens) => tokens, - None => return None, - }; + let tokens = tokens?; if attrs.len() == 0 { return Some(tokens.clone()) } |
