about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/librustc_trans/back/link.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs
index 60ce0517cfa..514d76a4129 100644
--- a/src/librustc_trans/back/link.rs
+++ b/src/librustc_trans/back/link.rs
@@ -147,9 +147,9 @@ pub(crate) fn link_binary(sess: &Session,
     for &crate_type in sess.crate_types.borrow().iter() {
         // Ignore executable crates if we have -Z no-trans, as they will error.
         let output_metadata = sess.opts.output_types.contains_key(&OutputType::Metadata);
-        let ignore_executable = sess.opts.debugging_opts.no_trans ||
-            !(sess.opts.output_types.should_trans() || output_metadata);
-        if crate_type == config::CrateTypeExecutable && ignore_executable {
+        if (sess.opts.debugging_opts.no_trans || !sess.opts.output_types.should_trans()) &&
+           !output_metadata &&
+           crate_type == config::CrateTypeExecutable {
             continue;
         }