about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/transform
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-10-23 17:02:40 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-10-25 16:14:05 +0000
commitaf8a998b1ed2ed39f9c5514131f364f3fc163990 (patch)
treed40d693500200792338d8ed5aa37acf8f2340b0d /compiler/rustc_const_eval/src/transform
parenteb03d40a9c946bbf57c655ed7d26dc44416ca4ad (diff)
downloadrust-af8a998b1ed2ed39f9c5514131f364f3fc163990.tar.gz
rust-af8a998b1ed2ed39f9c5514131f364f3fc163990.zip
Rename `AsyncCoroutineKind` to `CoroutineSource`
similar to how we have `MatchSource`, it explains where the desugaring came from.
Diffstat (limited to 'compiler/rustc_const_eval/src/transform')
-rw-r--r--compiler/rustc_const_eval/src/transform/check_consts/ops.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
index 616fab8fe7d..1258d71d521 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
@@ -360,7 +360,7 @@ impl<'tcx> NonConstOp<'tcx> for FnCallUnstable {
 pub struct Coroutine(pub hir::CoroutineKind);
 impl<'tcx> NonConstOp<'tcx> for Coroutine {
     fn status_in_item(&self, _: &ConstCx<'_, 'tcx>) -> Status {
-        if let hir::CoroutineKind::Async(hir::AsyncCoroutineKind::Block) = self.0 {
+        if let hir::CoroutineKind::Async(hir::CoroutineSource::Block) = self.0 {
             Status::Unstable(sym::const_async_blocks)
         } else {
             Status::Forbidden
@@ -373,7 +373,7 @@ impl<'tcx> NonConstOp<'tcx> for Coroutine {
         span: Span,
     ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> {
         let msg = format!("{}s are not allowed in {}s", self.0.descr(), ccx.const_kind());
-        if let hir::CoroutineKind::Async(hir::AsyncCoroutineKind::Block) = self.0 {
+        if let hir::CoroutineKind::Async(hir::CoroutineSource::Block) = self.0 {
             ccx.tcx.sess.create_feature_err(
                 errors::UnallowedOpInConstContext { span, msg },
                 sym::const_async_blocks,