about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/token.rs5
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())
     }