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

@@ -140,6 +140,11 @@ pub trait Visitor<'ast>: Sized {
fn visit_expr(&mut self, ex: &'ast Expr) {
walk_expr(self, ex)
}
/// This method is a hack to workaround unstable of `stmt_expr_attributes`.
/// It can be removed once that feature is stabilized.
fn visit_method_receiver_expr(&mut self, ex: &'ast Expr) {
self.visit_expr(ex)
}
fn visit_expr_post(&mut self, _ex: &'ast Expr) {}
fn visit_ty(&mut self, t: &'ast Ty) {
walk_ty(self, t)