Do not consider macro-origin await as chain item (#3671)
This commit is contained in:
parent
ff49b80628
commit
3200af9785
@ -168,7 +168,7 @@ impl ChainItemKind {
|
||||
let span = mk_sp(nested.span.hi(), field.span.hi());
|
||||
(kind, span)
|
||||
}
|
||||
ast::ExprKind::Await(_, ref nested) => {
|
||||
ast::ExprKind::Await(ast::AwaitOrigin::FieldLike, ref nested) => {
|
||||
let span = mk_sp(nested.span.hi(), expr.span.hi());
|
||||
(ChainItemKind::Await, span)
|
||||
}
|
||||
@ -396,7 +396,9 @@ impl Chain {
|
||||
}
|
||||
ast::ExprKind::Field(ref subexpr, _)
|
||||
| ast::ExprKind::Try(ref subexpr)
|
||||
| ast::ExprKind::Await(_, ref subexpr) => Some(Self::convert_try(subexpr, context)),
|
||||
| ast::ExprKind::Await(ast::AwaitOrigin::FieldLike, ref subexpr) => {
|
||||
Some(Self::convert_try(subexpr, context))
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
@ -19,3 +19,8 @@ async unsafe fn rust() {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
async fn await_macro() {
|
||||
await ! (
|
||||
something)?;
|
||||
}
|
||||
|
@ -18,3 +18,7 @@ async unsafe fn rust() {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
async fn await_macro() {
|
||||
await!(something)?;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user