]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_trans/trans/base.rs
Rollup merge of #22980 - alexcrichton:debug-assertions, r=pnkfelix
[rust.git] / src / librustc_trans / trans / base.rs
index 8302d0abe214e7cb5ddfc6a0a02ce7fa49aedbb9..f49905613d24cbd2a241880971d395022b2dd4a8 100644 (file)
@@ -3089,7 +3089,7 @@ pub fn trans_crate<'tcx>(analysis: ty::CrateAnalysis<'tcx>)
     let check_overflow = if let Some(v) = tcx.sess.opts.debugging_opts.force_overflow_checks {
         v
     } else {
-        !attr::contains_name(&krate.config, "ndebug")
+        tcx.sess.opts.debug_assertions
     };
 
     // Before we touch LLVM, make sure that multithreading is enabled.