diff options
| author | Wesley Wiser <wesleywiser@microsoft.com> | 2021-07-01 14:26:20 -0400 |
|---|---|---|
| committer | Wesley Wiser <wesleywiser@microsoft.com> | 2021-07-01 14:26:20 -0400 |
| commit | 721b622e075f8e36c048fb7f7ee689305c0c6d93 (patch) | |
| tree | adfbb9211e51466aa52b307de80fb1e41e1f46be /compiler/rustc_codegen_ssa/src | |
| parent | aac8a885520854e4b60ea5733b8b06f9e0cc1fcc (diff) | |
| download | rust-721b622e075f8e36c048fb7f7ee689305c0c6d93.tar.gz rust-721b622e075f8e36c048fb7f7ee689305c0c6d93.zip | |
Update cdb tests for expected output
Also an fix issue with tuple type names where we can't cast to them in natvis (required by the visualizer for `HashMap`) because of peculiarities with the natvis expression evaluator.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs | 14 |
1 files changed, 12 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 2684335d73d..a97c6a6b442 100644 --- a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs +++ b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs @@ -81,11 +81,21 @@ pub fn push_debuginfo_type_name<'tcx>( for component_type in component_types { push_debuginfo_type_name(tcx, component_type.expect_ty(), true, output, visited); - output.push_str(", "); + output.push(','); + + // Natvis does not always like having spaces between parts of the type name + // and this causes issues when we need to write a typename in natvis, for example + // as part of a cast like the `HashMap` visualizer does. + if !cpp_like_names { + output.push(' '); + } } if !component_types.is_empty() { output.pop(); - output.pop(); + + if !cpp_like_names { + output.pop(); + } } if cpp_like_names { |
