about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-05-10 14:38:00 +0200
committerRalf Jung <post@ralfj.de>2022-05-10 14:38:00 +0200
commit761077e19e4f59e4e68f39ec875b3f3799bf8a4f (patch)
tree03c3e8dc69fcbaee06c72bc03e6e6d385bc7fa9c /compiler/rustc_const_eval/src/interpret
parentaef8a9306d62fbad04a70c369e8472e47519f25d (diff)
downloadrust-761077e19e4f59e4e68f39ec875b3f3799bf8a4f.tar.gz
rust-761077e19e4f59e4e68f39ec875b3f3799bf8a4f.zip
fmt
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret')
-rw-r--r--compiler/rustc_const_eval/src/interpret/operand.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/operand.rs b/compiler/rustc_const_eval/src/interpret/operand.rs
index 1b32d887367..62a95fa57cf 100644
--- a/compiler/rustc_const_eval/src/interpret/operand.rs
+++ b/compiler/rustc_const_eval/src/interpret/operand.rs
@@ -403,9 +403,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
         // codegen does as good as we can (see `extract_field` in `rustc_codegen_ssa/src/mir/operand.rs`).
         let field_val: Immediate<_> = match (*base, base.layout.abi) {
             // the field contains no information
-            _ if field_layout.is_zst() => {
-                Scalar::ZST.into()
-            }
+            _ if field_layout.is_zst() => Scalar::ZST.into(),
             // the field covers the entire type
             _ if field_layout.size == base.layout.size => {
                 assert!(match (base.layout.abi, field_layout.abi) {