Skip to content

Commit

Permalink
LangItem-ify Coroutine trait in solvers
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Jun 13, 2024
1 parent 9921cd2 commit 78d94ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/ops/coroutine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ pub trait Coroutine<R = ()> {
/// values which are allowed to be returned each time a coroutine yields.
/// For example an iterator-as-a-coroutine would likely have this type as
/// `T`, the type being iterated over.
#[cfg_attr(not(bootstrap), lang = "coroutine_yield")]
type Yield;

/// The type of value this coroutine returns.
Expand All @@ -84,6 +85,7 @@ pub trait Coroutine<R = ()> {
/// `return` statement or implicitly as the last expression of a coroutine
/// literal. For example futures would use this as `Result<T, E>` as it
/// represents a completed future.
#[cfg_attr(not(bootstrap), lang = "coroutine_return")]
type Return;

/// Resumes the execution of this coroutine.
Expand Down

0 comments on commit 78d94ee

Please sign in to comment.