about summary refs log tree commit diff
path: root/src/libsyntax/diagnostics/plugin.rs
diff options
context:
space:
mode:
authorCedric <cedric.brancourt@gmail.com>2019-06-08 12:18:13 +0200
committerCedric <cedric.brancourt@gmail.com>2019-06-08 12:18:13 +0200
commit4123b5d796345bb01f0f40b2e28e6c194371fabe (patch)
treefd70212b1e3f20130662bc7a8be714f02343343b /src/libsyntax/diagnostics/plugin.rs
parentad91a8e59abca232a3e4449186712c032ab12519 (diff)
downloadrust-4123b5d796345bb01f0f40b2e28e6c194371fabe.tar.gz
rust-4123b5d796345bb01f0f40b2e28e6c194371fabe.zip
fix bad style for structs
Diffstat (limited to 'src/libsyntax/diagnostics/plugin.rs')
-rw-r--r--src/libsyntax/diagnostics/plugin.rs16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs
index b958a760e82..b4cf24f5ac5 100644
--- a/src/libsyntax/diagnostics/plugin.rs
+++ b/src/libsyntax/diagnostics/plugin.rs
@@ -34,7 +34,9 @@ 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,
+        &[
+            TokenTree::Token(Token { kind: token::Ident(code, _), .. })
+        ] => code,
         _ => unreachable!()
     };
 
@@ -67,12 +69,16 @@ 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, _), .. })] => {
+        &[
+            TokenTree::Token(Token { kind: token::Ident(code, _), .. })
+        ] => {
             (code, None)
         },
-        &[TokenTree::Token(Token { kind: token::Ident(code, _), .. }),
-          TokenTree::Token(Token { kind: token::Comma, .. }),
-          TokenTree::Token(Token { kind: token::Literal(token::Lit { symbol, .. }), ..})] => {
+        &[
+            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))
         },
         _ => unreachable!()