about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/debuginfo
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2022-07-07 15:01:43 +0200
committerMichael Woerister <michaelwoerister@posteo>2022-08-12 10:53:07 +0200
commit063ebfa5707015f895fc50c3a1dd70ab6867bc9b (patch)
tree1009c9ff1c236c70143b84a37a244529d7b01a87 /compiler/rustc_codegen_ssa/src/debuginfo
parent622da5d834e862112e860db1fc0404bd8604f578 (diff)
downloadrust-063ebfa5707015f895fc50c3a1dd70ab6867bc9b.tar.gz
rust-063ebfa5707015f895fc50c3a1dd70ab6867bc9b.zip
Use enum2<_> instead of enum<_> for Cpp-like debuginfo enum type names.
And add more comments about niche tag enum encoding.
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 1dde6ae8edf..135ed680da2 100644
--- a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
+++ b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
@@ -389,7 +389,7 @@ fn push_debuginfo_type_name<'tcx>(
             // Name will be "{closure_env#0}<T1, T2, ...>", "{generator_env#0}<T1, T2, ...>", or
             // "{async_fn_env#0}<T1, T2, ...>", etc.
             // In the case of cpp-like debuginfo, the name additionally gets wrapped inside of
-            // an artificial `enum$<>` type, as defined in msvc_enum_fallback().
+            // an artificial `enum2$<>` type, as defined in msvc_enum_fallback().
             if cpp_like_debuginfo && t.is_generator() {
                 let ty_and_layout = tcx.layout_of(ParamEnv::reveal_all().and(t)).unwrap();
                 msvc_enum_fallback(
@@ -434,7 +434,7 @@ fn push_debuginfo_type_name<'tcx>(
         visited: &mut FxHashSet<Ty<'tcx>>,
     ) {
         debug_assert!(!wants_c_like_enum_debuginfo(ty_and_layout));
-        output.push_str("enum$<");
+        output.push_str("enum2$<");
         push_inner(output, visited);
         push_close_angle_bracket(true, output);
     }