diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-07-03 23:30:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-03 23:30:10 +0200 |
| commit | 79bdb89a4a12f1a968b3fe025eb808f128dece13 (patch) | |
| tree | c43ae138d86ac6a5d6548a4f40433df170e52cc0 /compiler/rustc_mir_transform/src | |
| parent | 00765e193b61a3be50c901ddf3428582a5bb36b7 (diff) | |
| parent | 493093796014201f8b519324d45f00c8b2e7f2b2 (diff) | |
| download | rust-79bdb89a4a12f1a968b3fe025eb808f128dece13.tar.gz rust-79bdb89a4a12f1a968b3fe025eb808f128dece13.zip | |
Rollup merge of #127294 - ldm0:ldm_coroutine2, r=lcnr
Less magic number for corountine
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/coroutine.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/compiler/rustc_mir_transform/src/coroutine.rs b/compiler/rustc_mir_transform/src/coroutine.rs index 05674792426..4c00038365b 100644 --- a/compiler/rustc_mir_transform/src/coroutine.rs +++ b/compiler/rustc_mir_transform/src/coroutine.rs @@ -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> { |
