Only suggest adding ! to expressions that can be macro invocation

This commit is contained in:
Esteban Kuber
2022-01-19 02:27:15 +00:00
parent 9ad5d82f82
commit 017747fa5a
6 changed files with 82 additions and 24 deletions

View File

@@ -2517,6 +2517,10 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
self.visit_expr(elem);
self.resolve_anon_const(ct, IsRepeatExpr::Yes);
}
ExprKind::Index(ref elem, ref idx) => {
self.resolve_expr(elem, Some(expr));
self.visit_expr(idx);
}
_ => {
visit::walk_expr(self, expr);
}