From b1b1458233a7464383367e406115caa80c87cb2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Le=C3=B3n=20Orell=20Valerian=20Liehr?= Date: Thu, 26 Oct 2023 15:18:50 +0200 Subject: [PATCH] Replace type flag HAS_TY_GENERATOR with HAS_TY_COROUTINE --- compiler/rustc_middle/src/ty/flags.rs | 2 +- compiler/rustc_middle/src/ty/visit.rs | 2 +- compiler/rustc_type_ir/src/flags.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_middle/src/ty/flags.rs b/compiler/rustc_middle/src/ty/flags.rs index d75315b7ac955..a348e9f608aab 100644 --- a/compiler/rustc_middle/src/ty/flags.rs +++ b/compiler/rustc_middle/src/ty/flags.rs @@ -134,7 +134,7 @@ impl FlagComputation { if should_remove_further_specializable { self.flags -= TypeFlags::STILL_FURTHER_SPECIALIZABLE; } - self.add_flags(TypeFlags::HAS_TY_GENERATOR); + self.add_flags(TypeFlags::HAS_TY_COROUTINE); } &ty::Closure(_, args) => { diff --git a/compiler/rustc_middle/src/ty/visit.rs b/compiler/rustc_middle/src/ty/visit.rs index 15de994864462..ab0999b3f197f 100644 --- a/compiler/rustc_middle/src/ty/visit.rs +++ b/compiler/rustc_middle/src/ty/visit.rs @@ -48,7 +48,7 @@ pub trait TypeVisitableExt<'tcx>: TypeVisitable> { self.has_type_flags(TypeFlags::HAS_TY_OPAQUE) } fn has_coroutines(&self) -> bool { - self.has_type_flags(TypeFlags::HAS_TY_GENERATOR) + self.has_type_flags(TypeFlags::HAS_TY_COROUTINE) } fn references_error(&self) -> bool { self.has_type_flags(TypeFlags::HAS_ERROR) diff --git a/compiler/rustc_type_ir/src/flags.rs b/compiler/rustc_type_ir/src/flags.rs index 2acb903c217a1..d5cadd4e83a7c 100644 --- a/compiler/rustc_type_ir/src/flags.rs +++ b/compiler/rustc_type_ir/src/flags.rs @@ -113,7 +113,7 @@ bitflags! { /// Does this value have `InferConst::Fresh`? const HAS_CT_FRESH = 1 << 22; - /// Does this have `Generator` or `GeneratorWitness`? - const HAS_TY_GENERATOR = 1 << 23; + /// Does this have `Coroutine` or `CoroutineWitness`? + const HAS_TY_COROUTINE = 1 << 23; } }