Skip to content

Commit 6b9c151

Browse files
Tweak await span
1 parent f4c9b4c commit 6b9c151

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/chains.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ impl ChainItemKind {
232232
let span = mk_sp(nested.span.hi(), field.span.hi());
233233
(kind, span)
234234
}
235-
ast::ExprKind::Await(ref nested) => {
235+
ast::ExprKind::Await(ref nested, _) => {
236236
let span = mk_sp(nested.span.hi(), expr.span.hi());
237237
(ChainItemKind::Await, span)
238238
}
@@ -459,7 +459,7 @@ impl Chain {
459459
ast::ExprKind::MethodCall(ref call) => Some(Self::convert_try(&call.receiver, context)),
460460
ast::ExprKind::Field(ref subexpr, _)
461461
| ast::ExprKind::Try(ref subexpr)
462-
| ast::ExprKind::Await(ref subexpr) => Some(Self::convert_try(subexpr, context)),
462+
| ast::ExprKind::Await(ref subexpr, _) => Some(Self::convert_try(subexpr, context)),
463463
_ => None,
464464
}
465465
}

src/expr.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ pub(crate) fn format_expr(
218218
ast::ExprKind::Try(..)
219219
| ast::ExprKind::Field(..)
220220
| ast::ExprKind::MethodCall(..)
221-
| ast::ExprKind::Await(_) => rewrite_chain(expr, context, shape),
221+
| ast::ExprKind::Await(_, _) => rewrite_chain(expr, context, shape),
222222
ast::ExprKind::MacCall(ref mac) => {
223223
rewrite_macro(mac, None, context, shape, MacroPosition::Expression).or_else(|| {
224224
wrap_str(
@@ -1889,7 +1889,7 @@ impl<'ast> RhsAssignKind<'ast> {
18891889
ast::ExprKind::Try(..)
18901890
| ast::ExprKind::Field(..)
18911891
| ast::ExprKind::MethodCall(..)
1892-
| ast::ExprKind::Await(_)
1892+
| ast::ExprKind::Await(_, _)
18931893
)
18941894
}
18951895
_ => false,

0 commit comments

Comments
 (0)