about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-07-30 21:39:15 -0400
committerRalf Jung <post@ralfj.de>2022-07-31 08:23:27 -0400
commitabd80d904ba89f04f4ddb15a0a610d0dfbb44afe (patch)
treeedf03ae81c7a6cb3438c3774778b8460c24af09d /compiler
parent98e52c2a273c923a4e43eeee6a0c3d1a6d91dbce (diff)
downloadrust-abd80d904ba89f04f4ddb15a0a610d0dfbb44afe.tar.gz
rust-abd80d904ba89f04f4ddb15a0a610d0dfbb44afe.zip
reorder fields in Laout debug output
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_target/src/abi/mod.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/compiler/rustc_target/src/abi/mod.rs b/compiler/rustc_target/src/abi/mod.rs
index b35502d9ee4..d4d5674e246 100644
--- a/compiler/rustc_target/src/abi/mod.rs
+++ b/compiler/rustc_target/src/abi/mod.rs
@@ -1279,13 +1279,14 @@ impl<'a> fmt::Debug for LayoutS<'a> {
         // This is how `Layout` used to print before it become
         // `Interned<LayoutS>`. We print it like this to avoid having to update
         // expected output in a lot of tests.
+        let LayoutS { size, align, abi, fields, largest_niche, variants } = self;
         f.debug_struct("Layout")
-            .field("fields", &self.fields)
-            .field("variants", &self.variants)
-            .field("abi", &self.abi)
-            .field("largest_niche", &self.largest_niche)
-            .field("align", &self.align)
-            .field("size", &self.size)
+            .field("size", size)
+            .field("align", align)
+            .field("abi", abi)
+            .field("fields", fields)
+            .field("largest_niche", largest_niche)
+            .field("variants", variants)
             .finish()
     }
 }