]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_ast/src/visit.rs
Rollup merge of #95710 - fee1-dead-contrib:stabilize_arbitrary_enum_discriminant...
[rust.git] / compiler / rustc_ast / src / visit.rs
index 145b31842ef6989a4b7429887b17520d35b85b88..6f56c1ef0e8daa6ff4e5fad425bd1171a51cc4f6 100644 (file)
@@ -140,6 +140,11 @@ fn visit_anon_const(&mut self, c: &'ast AnonConst) {
     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)
@@ -683,7 +688,7 @@ pub fn walk_assoc_item<'a, V: Visitor<'a>>(visitor: &mut V, item: &'a AssocItem,
             let kind = FnKind::Fn(FnCtxt::Assoc(ctxt), ident, sig, vis, generics, body.as_deref());
             visitor.visit_fn(kind, span, id);
         }
-        AssocItemKind::TyAlias(box TyAlias { generics, bounds, ty, .. }) => {
+        AssocItemKind::Type(box TyAlias { generics, bounds, ty, .. }) => {
             visitor.visit_generics(generics);
             walk_list!(visitor, visit_param_bound, bounds, BoundKind::Bound);
             walk_list!(visitor, visit_ty, ty);