Tweak await span
This commit is contained in:
parent
f4c9b4c26f
commit
6b9c151686
@ -232,7 +232,7 @@ impl ChainItemKind {
|
||||
let span = mk_sp(nested.span.hi(), field.span.hi());
|
||||
(kind, span)
|
||||
}
|
||||
ast::ExprKind::Await(ref nested) => {
|
||||
ast::ExprKind::Await(ref nested, _) => {
|
||||
let span = mk_sp(nested.span.hi(), expr.span.hi());
|
||||
(ChainItemKind::Await, span)
|
||||
}
|
||||
@ -459,7 +459,7 @@ impl Chain {
|
||||
ast::ExprKind::MethodCall(ref call) => Some(Self::convert_try(&call.receiver, context)),
|
||||
ast::ExprKind::Field(ref subexpr, _)
|
||||
| ast::ExprKind::Try(ref subexpr)
|
||||
| ast::ExprKind::Await(ref subexpr) => Some(Self::convert_try(subexpr, context)),
|
||||
| ast::ExprKind::Await(ref subexpr, _) => Some(Self::convert_try(subexpr, context)),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ pub(crate) fn format_expr(
|
||||
ast::ExprKind::Try(..)
|
||||
| ast::ExprKind::Field(..)
|
||||
| ast::ExprKind::MethodCall(..)
|
||||
| ast::ExprKind::Await(_) => rewrite_chain(expr, context, shape),
|
||||
| ast::ExprKind::Await(_, _) => rewrite_chain(expr, context, shape),
|
||||
ast::ExprKind::MacCall(ref mac) => {
|
||||
rewrite_macro(mac, None, context, shape, MacroPosition::Expression).or_else(|| {
|
||||
wrap_str(
|
||||
@ -1889,7 +1889,7 @@ impl<'ast> RhsAssignKind<'ast> {
|
||||
ast::ExprKind::Try(..)
|
||||
| ast::ExprKind::Field(..)
|
||||
| ast::ExprKind::MethodCall(..)
|
||||
| ast::ExprKind::Await(_)
|
||||
| ast::ExprKind::Await(_, _)
|
||||
)
|
||||
}
|
||||
_ => false,
|
||||
|
Loading…
x
Reference in New Issue
Block a user