1
Fork 0

Workaround unstable stmt_expr_attributes for method receiver expressions.

This commit is contained in:
Camille GILLOT 2022-10-23 09:22:19 +00:00
parent 6c9c2d862d
commit 74d4eefc13
9 changed files with 121 additions and 19 deletions

View file

@ -210,8 +210,15 @@ impl CfgEval<'_, '_> {
}
impl MutVisitor for CfgEval<'_, '_> {
#[instrument(level = "trace", skip(self))]
fn visit_expr(&mut self, expr: &mut P<ast::Expr>) {
self.cfg.configure_expr(expr);
self.cfg.configure_expr(expr, false);
mut_visit::noop_visit_expr(expr, self);
}
#[instrument(level = "trace", skip(self))]
fn visit_method_receiver_expr(&mut self, expr: &mut P<ast::Expr>) {
self.cfg.configure_expr(expr, true);
mut_visit::noop_visit_expr(expr, self);
}