about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/debuginfo
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-09-11 17:23:56 -0400
committerMichael Goulet <michael@errs.io>2024-09-11 17:24:01 -0400
commitaf8d911d63d6b38ea2da36a330b035dd2e6f89a7 (patch)
treead39949e1071a021f16e808ecf00f6148dd0d488 /compiler/rustc_codegen_ssa/src/debuginfo
parent954419aab01264707f116899e77be682b02764ea (diff)
downloadrust-af8d911d63d6b38ea2da36a330b035dd2e6f89a7.tar.gz
rust-af8d911d63d6b38ea2da36a330b035dd2e6f89a7.zip
Also fix if in else
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/debuginfo')
-rw-r--r--compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
index 5103b2f3158..e34fbfe3f76 100644
--- a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
+++ b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
@@ -236,15 +236,13 @@ fn push_debuginfo_type_name<'tcx>(
             let has_enclosing_parens = if cpp_like_debuginfo {
                 output.push_str("dyn$<");
                 false
+            } else if trait_data.len() > 1 && auto_traits.len() != 0 {
+                // We need enclosing parens because there is more than one trait
+                output.push_str("(dyn ");
+                true
             } else {
-                if trait_data.len() > 1 && auto_traits.len() != 0 {
-                    // We need enclosing parens because there is more than one trait
-                    output.push_str("(dyn ");
-                    true
-                } else {
-                    output.push_str("dyn ");
-                    false
-                }
+                output.push_str("dyn ");
+                false
             };
 
             if let Some(principal) = trait_data.principal() {