Keep info on pre-desugaring expression for better "incorrect .await" suggestion
Keep the `HirId` of `.await`ed expressions so in the case of a `fn` call on on a sync `fn`, we can suggest maybe turning it into an `async fn`.
This commit is contained in:
@@ -52,7 +52,7 @@ impl<'tcx> LateLintPass<'tcx> for ArrayIntoIter {
|
||||
if let hir::ExprKind::Call(path, [arg]) = &arg.kind {
|
||||
if let hir::ExprKind::Path(hir::QPath::LangItem(
|
||||
hir::LangItem::IntoIterIntoIter,
|
||||
_,
|
||||
..,
|
||||
)) = &path.kind
|
||||
{
|
||||
self.for_expr_span = arg.span;
|
||||
|
||||
Reference in New Issue
Block a user