From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- compiler/rustc_ast/src/visit.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'compiler/rustc_ast/src/visit.rs') diff --git a/compiler/rustc_ast/src/visit.rs b/compiler/rustc_ast/src/visit.rs index 991eb489f..e8823eff8 100644 --- a/compiler/rustc_ast/src/visit.rs +++ b/compiler/rustc_ast/src/visit.rs @@ -92,7 +92,7 @@ impl<'a> FnKind<'a> { #[derive(Copy, Clone, Debug)] pub enum LifetimeCtxt { /// Appears in a reference type. - Rptr, + Ref, /// Appears as a bound on a type or another lifetime. Bound, /// Appears as a generic argument. @@ -396,8 +396,8 @@ pub fn walk_ty<'a, V: Visitor<'a>>(visitor: &mut V, typ: &'a Ty) { match &typ.kind { TyKind::Slice(ty) | TyKind::Paren(ty) => visitor.visit_ty(ty), TyKind::Ptr(mutable_type) => visitor.visit_ty(&mutable_type.ty), - TyKind::Rptr(opt_lifetime, mutable_type) => { - walk_list!(visitor, visit_lifetime, opt_lifetime, LifetimeCtxt::Rptr); + TyKind::Ref(opt_lifetime, mutable_type) => { + walk_list!(visitor, visit_lifetime, opt_lifetime, LifetimeCtxt::Ref); visitor.visit_ty(&mutable_type.ty) } TyKind::Tup(tuple_element_types) => { @@ -836,6 +836,7 @@ pub fn walk_expr<'a, V: Visitor<'a>>(visitor: &mut V, expression: &'a Expr) { binder, capture_clause: _, asyncness: _, + constness: _, movability: _, fn_decl, body, -- cgit v1.2.3