about summary refs log tree commit diff
path: root/src/libsyntax/diagnostics/plugin.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/diagnostics/plugin.rs')
-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!()
     };