about summary refs log tree commit diff
path: root/compiler/rustc_macros/src
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-02-08 22:12:13 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-02-08 22:12:13 +0000
commit1fcae03369abb4c2cc180cd5a49e1f4440a81300 (patch)
treefe705ff77c286f5fc4c09acc98d2f124086d0479 /compiler/rustc_macros/src
parent3183b44a1ec209b06e0c26cbc92217176b59dc76 (diff)
downloadrust-1fcae03369abb4c2cc180cd5a49e1f4440a81300.tar.gz
rust-1fcae03369abb4c2cc180cd5a49e1f4440a81300.zip
Rustfmt
Diffstat (limited to 'compiler/rustc_macros/src')
-rw-r--r--compiler/rustc_macros/src/serialize.rs34
-rw-r--r--compiler/rustc_macros/src/symbols/tests.rs8
2 files changed, 24 insertions, 18 deletions
diff --git a/compiler/rustc_macros/src/serialize.rs b/compiler/rustc_macros/src/serialize.rs
index ce692abfb98..2c33a0ac0aa 100644
--- a/compiler/rustc_macros/src/serialize.rs
+++ b/compiler/rustc_macros/src/serialize.rs
@@ -105,11 +105,14 @@ fn decodable_body(
     };
     s.underscore_const(true);
 
-    s.bound_impl(quote!(::rustc_serialize::Decodable<#decoder_ty>), quote! {
-        fn decode(__decoder: &mut #decoder_ty) -> Self {
-            #decode_body
-        }
-    })
+    s.bound_impl(
+        quote!(::rustc_serialize::Decodable<#decoder_ty>),
+        quote! {
+            fn decode(__decoder: &mut #decoder_ty) -> Self {
+                #decode_body
+            }
+        },
+    )
 }
 
 fn decode_field(field: &syn::Field) -> proc_macro2::TokenStream {
@@ -285,13 +288,16 @@ fn encodable_body(
         quote! {}
     };
 
-    s.bound_impl(quote!(::rustc_serialize::Encodable<#encoder_ty>), quote! {
-        fn encode(
-            &self,
-            __encoder: &mut #encoder_ty,
-        ) {
-            #lints
-            #encode_body
-        }
-    })
+    s.bound_impl(
+        quote!(::rustc_serialize::Encodable<#encoder_ty>),
+        quote! {
+            fn encode(
+                &self,
+                __encoder: &mut #encoder_ty,
+            ) {
+                #lints
+                #encode_body
+            }
+        },
+    )
 }
diff --git a/compiler/rustc_macros/src/symbols/tests.rs b/compiler/rustc_macros/src/symbols/tests.rs
index b32ce60e204..9c53453df5b 100644
--- a/compiler/rustc_macros/src/symbols/tests.rs
+++ b/compiler/rustc_macros/src/symbols/tests.rs
@@ -94,8 +94,8 @@ fn check_symbol_order() {
             aardvark,
         }
     };
-    test_symbols_macro(input, &[
-        "Symbol `aardvark` must precede `zebra`",
-        "location of previous symbol `zebra`",
-    ]);
+    test_symbols_macro(
+        input,
+        &["Symbol `aardvark` must precede `zebra`", "location of previous symbol `zebra`"],
+    );
 }