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-03-14 17:11:58 +0100
committerMichael Woerister <michaelwoerister@posteo>2022-03-14 17:25:17 +0100
commit9580a7115d2d75514f0b329a29fafaa3796bd950 (patch)
treed3939b8140e302c4bd013ef5f40da3f79ea0744a /compiler/rustc_codegen_ssa/src/debuginfo
parent19707b0ff2c0beb80f77eaa7274f4588a506309d (diff)
downloadrust-9580a7115d2d75514f0b329a29fafaa3796bd950.tar.gz
rust-9580a7115d2d75514f0b329a29fafaa3796bd950.zip
debuginfo: Refactor debuginfo generation for types -- Address review comments.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/debuginfo')
-rw-r--r--compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs2
1 files changed, 1 insertions, 1 deletions
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}<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().
-            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,