about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/debuginfo
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-03-15 16:26:10 +0000
committerbors <bors@rust-lang.org>2022-03-15 16:26:10 +0000
commit83460d5e624e9dff72ea8c8f6e79c10af10a3aa1 (patch)
treef2d074688426dbc31be510967d35521632a7346d /compiler/rustc_codegen_ssa/src/debuginfo
parentbe52b4af5ec7e49572cb16519b7e144d6bcb051d (diff)
parent183262d8d3e2af06f07c5d601b71f407846a267b (diff)
downloadrust-83460d5e624e9dff72ea8c8f6e79c10af10a3aa1.tar.gz
rust-83460d5e624e9dff72ea8c8f6e79c10af10a3aa1.zip
Auto merge of #94966 - matthiaskrgr:rollup-iqzswh3, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #94810 (debuginfo: Fix bug in type name generation for dyn types with associated types but no other generic arguments.)
 - #94947 (fix typos)
 - #94956 (Fix small typo in FIXME)
 - #94958 (Support other types of pluralization in pluralize macro)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/debuginfo')
-rw-r--r--compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs13
1 files changed, 10 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
index fc2921fbd3f..4b1563ca3c9 100644
--- a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
+++ b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
@@ -226,13 +226,18 @@ fn push_debuginfo_type_name<'tcx>(
                 if projection_bounds.len() != 0 {
                     if principal_has_generic_params {
                         // push_generic_params_internal() above added a `>` but we actually
-                        // want to add more items to that list, so remove that again.
+                        // want to add more items to that list, so remove that again...
                         pop_close_angle_bracket(output);
+                        // .. and add a comma to separate the regular generic args from the
+                        // associated types.
+                        push_arg_separator(cpp_like_debuginfo, output);
+                    } else {
+                        // push_generic_params_internal() did not add `<...>`, so we open
+                        // angle brackets here.
+                        output.push('<');
                     }
 
                     for (item_def_id, ty) in projection_bounds {
-                        push_arg_separator(cpp_like_debuginfo, output);
-
                         if cpp_like_debuginfo {
                             output.push_str("assoc$<");
                             push_item_name(tcx, item_def_id, false, output);
@@ -244,8 +249,10 @@ fn push_debuginfo_type_name<'tcx>(
                             output.push('=');
                             push_debuginfo_type_name(tcx, ty, true, output, visited);
                         }
+                        push_arg_separator(cpp_like_debuginfo, output);
                     }
 
+                    pop_arg_separator(output);
                     push_close_angle_bracket(cpp_like_debuginfo, output);
                 }