Rollup merge of #127294 - ldm0:ldm_coroutine2, r=lcnr

Less magic number for corountine
This commit is contained in:
Matthias Krüger 2024-07-03 23:30:10 +02:00 committed by GitHub
commit 79bdb89a4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 6 deletions

View file

@ -208,11 +208,8 @@ const UNRESUMED: usize = CoroutineArgs::UNRESUMED;
const RETURNED: usize = CoroutineArgs::RETURNED;
/// Coroutine has panicked and is poisoned.
const POISONED: usize = CoroutineArgs::POISONED;
/// Number of variants to reserve in coroutine state. Corresponds to
/// `UNRESUMED` (beginning of a coroutine) and `RETURNED`/`POISONED`
/// (end of a coroutine) states.
const RESERVED_VARIANTS: usize = 3;
/// Number of reserved variants of coroutine state.
const RESERVED_VARIANTS: usize = CoroutineArgs::RESERVED_VARIANTS;
/// A `yield` point in the coroutine.
struct SuspensionPoint<'tcx> {