about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-07-03 23:25:24 +0000
committerbors <bors@rust-lang.org>2024-07-03 23:25:24 +0000
commitb45401283fad51849dbb37d78f0b2093a21fb58f (patch)
tree947158ee85298fa325157580e8dc74bf94a16b2d /compiler/rustc_mir_transform/src
parentaa1d4f6826de006b02fed31a718ce4f674203721 (diff)
parent79bdb89a4a12f1a968b3fe025eb808f128dece13 (diff)
downloadrust-b45401283fad51849dbb37d78f0b2093a21fb58f.tar.gz
rust-b45401283fad51849dbb37d78f0b2093a21fb58f.zip
Auto merge of #127296 - matthiaskrgr:rollup-1t1isa7, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #127092 (Change return-type-notation to use `(..)`)
 - #127184 (More refactorings to rustc_interface)
 - #127190 (Update LLVM submodule)
 - #127253 (Fix incorrect suggestion for extra argument with a type error)
 - #127280 (Disable rmake test rustdoc-io-error on riscv64gc-gnu)
 - #127294 (Less magic number for corountine)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_transform/src')
-rw-r--r--compiler/rustc_mir_transform/src/coroutine.rs7
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> {