about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/debuginfo
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-12-23 04:09:45 +0000
committerbors <bors@rust-lang.org>2023-12-23 04:09:45 +0000
commitc03d978a4bcb7c01d8cdf80bd7600b27e2d21588 (patch)
treead0c5d00194aa5bb53375d28a77f3a3077aaa980 /compiler/rustc_codegen_ssa/src/debuginfo
parent495203bf61efabecc2c460be38e1eb0f9952601b (diff)
parent8c50e3eaeef34470a80f099feb2cbbdba2e7d61f (diff)
downloadrust-c03d978a4bcb7c01d8cdf80bd7600b27e2d21588.tar.gz
rust-c03d978a4bcb7c01d8cdf80bd7600b27e2d21588.zip
Auto merge of #119237 - compiler-errors:rollup-umyyu7d, r=compiler-errors
Rollup of 6 pull requests

Successful merges:

 - #119012 (Extract `layout_of_{struct,enum}` fn)
 - #119077 (Separate MIR lints from validation)
 - #119171 (Cleanup error handlers: round 4)
 - #119198 (Split coroutine desugaring kind from source)
 - #119222 (Add `IntoAsyncIterator`)
 - #119230 (Exhaustiveness: clean up after librarification)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/debuginfo')
-rw-r--r--compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs36
1 files changed, 26 insertions, 10 deletions
diff --git a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
index dda30046bfb..2ecc5ad4fe4 100644
--- a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
+++ b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs
@@ -15,7 +15,7 @@ use rustc_data_structures::fx::FxHashSet;
 use rustc_data_structures::stable_hasher::{Hash64, HashStable, StableHasher};
 use rustc_hir::def_id::DefId;
 use rustc_hir::definitions::{DefPathData, DefPathDataName, DisambiguatedDefPathData};
-use rustc_hir::{CoroutineKind, CoroutineSource, Mutability};
+use rustc_hir::{CoroutineDesugaring, CoroutineKind, CoroutineSource, Mutability};
 use rustc_middle::ty::layout::{IntegerExt, TyAndLayout};
 use rustc_middle::ty::{self, ExistentialProjection, ParamEnv, Ty, TyCtxt};
 use rustc_middle::ty::{GenericArgKind, GenericArgsRef};
@@ -560,15 +560,31 @@ pub fn push_item_name(tcx: TyCtxt<'_>, def_id: DefId, qualified: bool, output: &
 
 fn coroutine_kind_label(coroutine_kind: Option<CoroutineKind>) -> &'static str {
     match coroutine_kind {
-        Some(CoroutineKind::Gen(CoroutineSource::Block)) => "gen_block",
-        Some(CoroutineKind::Gen(CoroutineSource::Closure)) => "gen_closure",
-        Some(CoroutineKind::Gen(CoroutineSource::Fn)) => "gen_fn",
-        Some(CoroutineKind::Async(CoroutineSource::Block)) => "async_block",
-        Some(CoroutineKind::Async(CoroutineSource::Closure)) => "async_closure",
-        Some(CoroutineKind::Async(CoroutineSource::Fn)) => "async_fn",
-        Some(CoroutineKind::AsyncGen(CoroutineSource::Block)) => "async_gen_block",
-        Some(CoroutineKind::AsyncGen(CoroutineSource::Closure)) => "async_gen_closure",
-        Some(CoroutineKind::AsyncGen(CoroutineSource::Fn)) => "async_gen_fn",
+        Some(CoroutineKind::Desugared(CoroutineDesugaring::Gen, CoroutineSource::Block)) => {
+            "gen_block"
+        }
+        Some(CoroutineKind::Desugared(CoroutineDesugaring::Gen, CoroutineSource::Closure)) => {
+            "gen_closure"
+        }
+        Some(CoroutineKind::Desugared(CoroutineDesugaring::Gen, CoroutineSource::Fn)) => "gen_fn",
+        Some(CoroutineKind::Desugared(CoroutineDesugaring::Async, CoroutineSource::Block)) => {
+            "async_block"
+        }
+        Some(CoroutineKind::Desugared(CoroutineDesugaring::Async, CoroutineSource::Closure)) => {
+            "async_closure"
+        }
+        Some(CoroutineKind::Desugared(CoroutineDesugaring::Async, CoroutineSource::Fn)) => {
+            "async_fn"
+        }
+        Some(CoroutineKind::Desugared(CoroutineDesugaring::AsyncGen, CoroutineSource::Block)) => {
+            "async_gen_block"
+        }
+        Some(CoroutineKind::Desugared(CoroutineDesugaring::AsyncGen, CoroutineSource::Closure)) => {
+            "async_gen_closure"
+        }
+        Some(CoroutineKind::Desugared(CoroutineDesugaring::AsyncGen, CoroutineSource::Fn)) => {
+            "async_gen_fn"
+        }
         Some(CoroutineKind::Coroutine) => "coroutine",
         None => "closure",
     }