diff options
Diffstat (limited to 'compiler/rustc_codegen_ssa')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs | 16 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/analyze.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/block.rs | 2 |
3 files changed, 10 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 989df448a31..8cd627fc619 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::{AsyncGeneratorKind, GeneratorKind, Mutability}; +use rustc_hir::{AsyncCoroutineKind, CoroutineKind, Mutability}; use rustc_middle::ty::layout::{IntegerExt, TyAndLayout}; use rustc_middle::ty::{self, ExistentialProjection, ParamEnv, Ty, TyCtxt}; use rustc_middle::ty::{GenericArgKind, GenericArgsRef}; @@ -398,7 +398,7 @@ fn push_debuginfo_type_name<'tcx>( // processing visited.remove(&t); } - ty::Closure(def_id, args) | ty::Generator(def_id, args, ..) => { + ty::Closure(def_id, args) | ty::Coroutine(def_id, args, ..) => { // 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 @@ -426,7 +426,7 @@ fn push_debuginfo_type_name<'tcx>( | ty::Placeholder(..) | ty::Alias(..) | ty::Bound(..) - | ty::GeneratorWitness(..) => { + | ty::CoroutineWitness(..) => { bug!( "debuginfo: Trying to create type name for \ unexpected type: {:?}", @@ -558,12 +558,12 @@ pub fn push_item_name(tcx: TyCtxt<'_>, def_id: DefId, qualified: bool, output: & push_unqualified_item_name(tcx, def_id, def_key.disambiguated_data, output); } -fn generator_kind_label(generator_kind: Option<GeneratorKind>) -> &'static str { +fn generator_kind_label(generator_kind: Option<CoroutineKind>) -> &'static str { match generator_kind { - Some(GeneratorKind::Async(AsyncGeneratorKind::Block)) => "async_block", - Some(GeneratorKind::Async(AsyncGeneratorKind::Closure)) => "async_closure", - Some(GeneratorKind::Async(AsyncGeneratorKind::Fn)) => "async_fn", - Some(GeneratorKind::Gen) => "generator", + Some(CoroutineKind::Async(AsyncCoroutineKind::Block)) => "async_block", + Some(CoroutineKind::Async(AsyncCoroutineKind::Closure)) => "async_closure", + Some(CoroutineKind::Async(AsyncCoroutineKind::Fn)) => "async_fn", + Some(CoroutineKind::Gen) => "generator", None => "closure", } } diff --git a/compiler/rustc_codegen_ssa/src/mir/analyze.rs b/compiler/rustc_codegen_ssa/src/mir/analyze.rs index 62e997e5cfa..53cc063e55a 100644 --- a/compiler/rustc_codegen_ssa/src/mir/analyze.rs +++ b/compiler/rustc_codegen_ssa/src/mir/analyze.rs @@ -272,7 +272,7 @@ pub fn cleanup_kinds(mir: &mir::Body<'_>) -> IndexVec<mir::BasicBlock, CleanupKi | TerminatorKind::UnwindResume | TerminatorKind::UnwindTerminate(_) | TerminatorKind::Return - | TerminatorKind::GeneratorDrop + | TerminatorKind::CoroutineDrop | TerminatorKind::Unreachable | TerminatorKind::SwitchInt { .. } | TerminatorKind::Yield { .. } diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs index 68f22aaf990..f35cf282072 100644 --- a/compiler/rustc_codegen_ssa/src/mir/block.rs +++ b/compiler/rustc_codegen_ssa/src/mir/block.rs @@ -1265,7 +1265,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { fn_span, mergeable_succ(), ), - mir::TerminatorKind::GeneratorDrop | mir::TerminatorKind::Yield { .. } => { + mir::TerminatorKind::CoroutineDrop | mir::TerminatorKind::Yield { .. } => { bug!("generator ops in codegen") } mir::TerminatorKind::FalseEdge { .. } | mir::TerminatorKind::FalseUnwind { .. } => { |
