From 063ebfa5707015f895fc50c3a1dd70ab6867bc9b Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Thu, 7 Jul 2022 15:01:43 +0200 Subject: Use enum2<_> instead of enum<_> for Cpp-like debuginfo enum type names. And add more comments about niche tag enum encoding. --- compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_codegen_ssa') 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}", "{generator_env#0}", or // "{async_fn_env#0}", 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>, ) { 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); } -- cgit 1.4.1-3-g733a5