about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/back/lto.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-09-11 13:32:53 -0400
committerMichael Goulet <michael@errs.io>2024-09-11 13:45:23 -0400
commit954419aab01264707f116899e77be682b02764ea (patch)
tree9c66d40f49925803e11e7aebe913bf39297a9751 /compiler/rustc_codegen_llvm/src/back/lto.rs
parent5a2dd7d4f3210629e65879aeecbe643ba3b86bb4 (diff)
downloadrust-954419aab01264707f116899e77be682b02764ea.tar.gz
rust-954419aab01264707f116899e77be682b02764ea.zip
Simplify some nested if statements
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/back/lto.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/back/lto.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/lto.rs b/compiler/rustc_codegen_llvm/src/back/lto.rs
index 09896b89ebf..2ebe0be53aa 100644
--- a/compiler/rustc_codegen_llvm/src/back/lto.rs
+++ b/compiler/rustc_codegen_llvm/src/back/lto.rs
@@ -92,11 +92,9 @@ fn prepare_lto(
                     dcx.emit_err(LtoDylib);
                     return Err(FatalError);
                 }
-            } else if *crate_type == CrateType::ProcMacro {
-                if !cgcx.opts.unstable_opts.dylib_lto {
-                    dcx.emit_err(LtoProcMacro);
-                    return Err(FatalError);
-                }
+            } else if *crate_type == CrateType::ProcMacro && !cgcx.opts.unstable_opts.dylib_lto {
+                dcx.emit_err(LtoProcMacro);
+                return Err(FatalError);
             }
         }