about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/builder.rs
diff options
context:
space:
mode:
authorKivooeo <Kivooeo123@gmail.com>2025-07-26 06:21:22 +0500
committerKivooeo <Kivooeo123@gmail.com>2025-07-28 06:08:48 +0500
commit43725ed819c57b86b32a66c40572246b1f5b8952 (patch)
tree52149f83843b22ea6b0e039662a1a7348ce360e5 /compiler/rustc_codegen_llvm/src/builder.rs
parenta955f1cd09a027363729ceed919952d09f76f28e (diff)
downloadrust-43725ed819c57b86b32a66c40572246b1f5b8952.tar.gz
rust-43725ed819c57b86b32a66c40572246b1f5b8952.zip
use let chains in ast, borrowck, codegen, const_eval
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/builder.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs
index 0ade9edb0d2..f712b3b83fa 100644
--- a/compiler/rustc_codegen_llvm/src/builder.rs
+++ b/compiler/rustc_codegen_llvm/src/builder.rs
@@ -687,10 +687,10 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
                         bx.nonnull_metadata(load);
                     }
 
-                    if let Some(pointee) = layout.pointee_info_at(bx, offset) {
-                        if let Some(_) = pointee.safe {
-                            bx.align_metadata(load, pointee.align);
-                        }
+                    if let Some(pointee) = layout.pointee_info_at(bx, offset)
+                        && let Some(_) = pointee.safe
+                    {
+                        bx.align_metadata(load, pointee.align);
                     }
                 }
                 abi::Primitive::Float(_) => {}