From dd442a1fcfba98be5454c2ca6f56bce098e458ed Mon Sep 17 00:00:00 2001 From: Cedric Date: Sat, 8 Jun 2019 13:29:43 +0200 Subject: use default binding mode in match clauses --- src/libsyntax/diagnostics/plugin.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libsyntax/diagnostics') 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 { 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 { 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!() }; -- cgit 1.4.1-3-g733a5