Skip to content

Commit

Permalink
Rollup merge of #117221 - fmease:TypeFlags-HAS_TY_GENERATOR-to-COROUT…
Browse files Browse the repository at this point in the history
…INE, r=lqd

Rename type flag `HAS_TY_GENERATOR` to `HAS_TY_COROUTINE`

r? oli-obk
  • Loading branch information
matthiaskrgr committed Oct 26, 2023
2 parents 70a4678 + b1b1458 commit a461de7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/flags.rs
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/visit.rs
Expand Up @@ -48,7 +48,7 @@ pub trait TypeVisitableExt<'tcx>: TypeVisitable<TyCtxt<'tcx>> {
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)
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_type_ir/src/flags.rs
Expand Up @@ -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;
}
}

0 comments on commit a461de7

Please sign in to comment.