Skip to content

Commit 87f5f8e

Browse files
authored
Rollup merge of rust-lang#120143 - compiler-errors:consolidate-instance-resolve-for-coroutines, r=oli-obk
Consolidate logic around resolving built-in coroutine trait impls Deduplicates a lot of code. Requires defining a new lang item for `Coroutine::resume` for consistency, but it seems not harmful at worst, and potentially later useful at best. r? oli-obk
2 parents f7f9c1b + 8defadb commit 87f5f8e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/ops/coroutine.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ pub trait Coroutine<R = ()> {
111111
/// been returned previously. While coroutine literals in the language are
112112
/// guaranteed to panic on resuming after `Complete`, this is not guaranteed
113113
/// for all implementations of the `Coroutine` trait.
114+
#[cfg_attr(not(bootstrap), lang = "coroutine_resume")]
114115
fn resume(self: Pin<&mut Self>, arg: R) -> CoroutineState<Self::Yield, Self::Return>;
115116
}
116117

0 commit comments

Comments
 (0)