#[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.
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) => {
binder,
capture_clause: _,
asyncness: _,
+ constness: _,
movability: _,
fn_decl,
body,