Skip to content

Commit 227bcc3

Browse files
ICE
1 parent 2195131 commit 227bcc3

File tree

1 file changed

+12
-6
lines changed
  • futures-await-async-macro/src

1 file changed

+12
-6
lines changed

futures-await-async-macro/src/lib.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -338,14 +338,20 @@ pub fn async_block(input: TokenStream) -> TokenStream {
338338
// that we get the `call_site` span instead of the default span.
339339
let span = Span::call_site();
340340
syn::token::Paren(span).surround(&mut tokens, |tokens| {
341-
syn::token::Move(span).to_tokens(tokens);
342-
syn::token::OrOr([span, span]).to_tokens(tokens);
341+
syn::token::Unsafe(span).to_tokens(tokens);
343342
syn::token::Brace(span).surround(tokens, |tokens| {
344-
(quote_cs! {
345-
if false { yield ::futures::Async::NotReady }
346-
}).to_tokens(tokens);
347-
expr.to_tokens(tokens);
343+
syn::token::Static(span).to_tokens(tokens);
344+
syn::token::Move(span).to_tokens(tokens);
345+
syn::token::OrOr([span, span]).to_tokens(tokens);
346+
syn::token::Brace(span).surround(tokens, |tokens| {
347+
(quote_cs! {
348+
if false { yield ::futures::Async::NotReady }
349+
}).to_tokens(tokens);
350+
expr.to_tokens(tokens);
351+
});
348352
});
353+
354+
349355
});
350356

351357
tokens.into()

0 commit comments

Comments
 (0)