diff options
| author | Cedric <cedric.brancourt@gmail.com> | 2019-06-08 13:29:43 +0200 |
|---|---|---|
| committer | Cedric <cedric.brancourt@gmail.com> | 2019-06-08 13:29:43 +0200 |
| commit | dd442a1fcfba98be5454c2ca6f56bce098e458ed (patch) | |
| tree | dfe46ef20651bb405e98c13ecea13ef4ff60851c /src/libsyntax/diagnostics | |
| parent | 4123b5d796345bb01f0f40b2e28e6c194371fabe (diff) | |
| download | rust-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.rs | 10 |
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!() }; |
