From 9580a7115d2d75514f0b329a29fafaa3796bd950 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Mon, 14 Mar 2022 17:11:58 +0100 Subject: debuginfo: Refactor debuginfo generation for types -- Address review comments. --- compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_codegen_ssa/src/debuginfo') diff --git a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs index ee0658f486a..fc2921fbd3f 100644 --- a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs +++ b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs @@ -364,7 +364,7 @@ fn push_debuginfo_type_name<'tcx>( // "{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(). - if cpp_like_debuginfo && matches!(t.kind(), ty::Generator(..)) { + if cpp_like_debuginfo && t.is_generator() { let ty_and_layout = tcx.layout_of(ParamEnv::reveal_all().and(t)).unwrap(); msvc_enum_fallback( tcx, -- cgit 1.4.1-3-g733a5