about summary refs log tree commit diff
path: root/src/libsyntax/diagnostics
diff options
context:
space:
mode:
authorCedric <cedric.brancourt@gmail.com>2019-06-08 13:29:43 +0200
committerCedric <cedric.brancourt@gmail.com>2019-06-08 13:29:43 +0200
commitdd442a1fcfba98be5454c2ca6f56bce098e458ed (patch)
treedfe46ef20651bb405e98c13ecea13ef4ff60851c /src/libsyntax/diagnostics
parent4123b5d796345bb01f0f40b2e28e6c194371fabe (diff)
downloadrust-dd442a1fcfba98be5454c2ca6f56bce098e458ed.tar.gz
rust-dd442a1fcfba98be5454c2ca6f56bce098e458ed.zip
use default binding mode in match clauses
Diffstat (limited to 'src/libsyntax/diagnostics')
-rw-r--r--src/libsyntax/diagnostics/plugin.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs
index b4cf24f5ac5..98351048c35 100644
--- a/src/libsyntax/diagnostics/plugin.rs
+++ b/src/libsyntax/diagnostics/plugin.rs
@@ -34,7 +34,7 @@ pub fn expand_diagnostic_used<'cx>(ecx: &'cx mut ExtCtxt<'_>,
                                    token_tree: &[TokenTree])
                                    -> Box<dyn MacResult+'cx> {
     let code = match token_tree {
-        &[
+        [
             TokenTree::Token(Token { kind: token::Ident(code, _), .. })
         ] => code,
         _ => unreachable!()
@@ -69,17 +69,17 @@ pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt<'_>,
                                        token_tree: &[TokenTree])
                                        -> Box<dyn MacResult+'cx> {
     let (code, description) = match  token_tree {
-        &[
+        [
             TokenTree::Token(Token { kind: token::Ident(code, _), .. })
         ] => {
-            (code, None)
+            (*code, None)
         },
-        &[
+        [
             TokenTree::Token(Token { kind: token::Ident(code, _), .. }),
             TokenTree::Token(Token { kind: token::Comma, .. }),
             TokenTree::Token(Token { kind: token::Literal(token::Lit { symbol, .. }), ..})
         ] => {
-            (code, Some(symbol))
+            (*code, Some(*symbol))
         },
         _ => unreachable!()
     };