about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/debuginfo
diff options
context:
space:
mode:
authorJubilee Young <workingjubilee@gmail.com>2024-07-19 16:52:33 -0700
committerJubilee Young <workingjubilee@gmail.com>2024-07-20 00:16:44 -0700
commitce7b069fd840916415adf2357c6133e2c1e4625b (patch)
treed9fc894c05be64c81e35036bc2c6fa768945a242 /compiler/rustc_codegen_ssa/src/debuginfo
parent9057c3ffec44926d5e149dc13ff3ce1613b69cce (diff)
downloadrust-ce7b069fd840916415adf2357c6133e2c1e4625b.tar.gz
rust-ce7b069fd840916415adf2357c6133e2c1e4625b.zip
compiler: Never debug_assert in codegen
The gains in performance are not worth the costs in correctness.
This is partly because the gains are zero and the costs are unknown.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/debuginfo')
-rw-r--r--compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
index c4e5c858240..6a6d47fcbba 100644
--- a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
+++ b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
@@ -459,7 +459,7 @@ fn push_debuginfo_type_name<'tcx>(
         output: &mut String,
         visited: &mut FxHashSet<Ty<'tcx>>,
     ) {
-        debug_assert!(!wants_c_like_enum_debuginfo(ty_and_layout));
+        assert!(!wants_c_like_enum_debuginfo(ty_and_layout));
         output.push_str("enum2$<");
         push_inner(output, visited);
         push_close_angle_bracket(true, output);
@@ -660,7 +660,7 @@ fn push_generic_params_internal<'tcx>(
     output: &mut String,
     visited: &mut FxHashSet<Ty<'tcx>>,
 ) -> bool {
-    debug_assert_eq!(args, tcx.normalize_erasing_regions(ty::ParamEnv::reveal_all(), args));
+    assert_eq!(args, tcx.normalize_erasing_regions(ty::ParamEnv::reveal_all(), args));
     let mut args = args.non_erasable_generics(tcx, def_id).peekable();
     if args.peek().is_none() {
         return false;