Skip to content

Commit

Permalink
ICE
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulGrandperrin committed Mar 31, 2018
1 parent 2195131 commit 227bcc3
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions futures-await-async-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,20 @@ pub fn async_block(input: TokenStream) -> TokenStream {
// that we get the `call_site` span instead of the default span.
let span = Span::call_site();
syn::token::Paren(span).surround(&mut tokens, |tokens| {
syn::token::Move(span).to_tokens(tokens);
syn::token::OrOr([span, span]).to_tokens(tokens);
syn::token::Unsafe(span).to_tokens(tokens);
syn::token::Brace(span).surround(tokens, |tokens| {
(quote_cs! {
if false { yield ::futures::Async::NotReady }
}).to_tokens(tokens);
expr.to_tokens(tokens);
syn::token::Static(span).to_tokens(tokens);
syn::token::Move(span).to_tokens(tokens);
syn::token::OrOr([span, span]).to_tokens(tokens);
syn::token::Brace(span).surround(tokens, |tokens| {
(quote_cs! {
if false { yield ::futures::Async::NotReady }
}).to_tokens(tokens);
expr.to_tokens(tokens);
});
});


});

tokens.into()
Expand Down

0 comments on commit 227bcc3

Please sign in to comment.