Rollup merge of #127294 - ldm0:ldm_coroutine2, r=lcnr
Less magic number for corountine
This commit is contained in:
commit
79bdb89a4a
2 changed files with 7 additions and 6 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue