Skip to content

Commit eabf715

Browse files
committed
explicitly mark coroutine closures.
This is required with rust-lang/rust#123792
1 parent f002280 commit eabf715

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Diff for: effing-macros/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ pub fn effectful(args: TokenStream, item: TokenStream) -> TokenStream {
155155
Yield = #yield_type,
156156
Return = #return_type
157157
> #clone_bound {
158+
#[coroutine]
158159
move |_begin: <#yield_type as ::effing_mad::injection::EffectList>::Injections| {
159160
#block
160161
}

Diff for: src/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ pub fn map<E, I, T, U>(
111111
g: impl Coroutine<I, Yield = E, Return = T>,
112112
f: impl FnOnce(T) -> U,
113113
) -> impl Coroutine<I, Yield = E, Return = U> {
114+
#[coroutine]
114115
static move |mut injs: I| {
115116
let mut pinned = pin!(g);
116117
loop {
@@ -207,6 +208,7 @@ where
207208
PostIs: CoproductEmbedder<PreIs, EmbedIndices>,
208209
G: Coroutine<PreIs, Yield = PreEs, Return = R>,
209210
{
211+
#[coroutine]
210212
static move |_begin: PostIs| {
211213
let mut injection = PreIs::inject(Begin);
212214
let mut pinned = pin!(g);
@@ -342,6 +344,7 @@ where
342344
> + CoproductSubsetter<HandlerIs, SubsetIndices2>,
343345
G1: Coroutine<PreIs, Yield = PreEs, Return = R>,
344346
{
347+
#[coroutine]
345348
static move |_begin: PostIs| {
346349
let mut injection = PreIs::inject(Begin);
347350
let mut pinned = pin!(g);

0 commit comments

Comments
 (0)