@@ -572,7 +572,7 @@ impl Pat {
572572 PatKind :: MacCall ( mac) => TyKind :: MacCall ( mac. clone ( ) ) ,
573573 // `&mut? P` can be reinterpreted as `&mut? T` where `T` is `P` reparsed as a type.
574574 PatKind :: Ref ( pat, mutbl) => {
575- pat. to_ty ( ) . map ( |ty| TyKind :: Rptr ( None , MutTy { ty, mutbl : * mutbl } ) ) ?
575+ pat. to_ty ( ) . map ( |ty| TyKind :: Ref ( None , MutTy { ty, mutbl : * mutbl } ) ) ?
576576 }
577577 // A slice/array pattern `[P]` can be reparsed as `[T]`, an unsized array,
578578 // when `P` can be reparsed as a type `T`.
@@ -1193,7 +1193,7 @@ impl Expr {
11931193 ExprKind :: Paren ( expr) => expr. to_ty ( ) . map ( TyKind :: Paren ) ?,
11941194
11951195 ExprKind :: AddrOf ( BorrowKind :: Ref , mutbl, expr) => {
1196- expr. to_ty ( ) . map ( |ty| TyKind :: Rptr ( None , MutTy { ty, mutbl : * mutbl } ) ) ?
1196+ expr. to_ty ( ) . map ( |ty| TyKind :: Ref ( None , MutTy { ty, mutbl : * mutbl } ) ) ?
11971197 }
11981198
11991199 ExprKind :: Repeat ( expr, expr_len) => {
@@ -2031,7 +2031,7 @@ impl Clone for Ty {
20312031impl Ty {
20322032 pub fn peel_refs ( & self ) -> & Self {
20332033 let mut final_ty = self ;
2034- while let TyKind :: Rptr ( _, MutTy { ty, .. } ) = & final_ty. kind {
2034+ while let TyKind :: Ref ( _, MutTy { ty, .. } ) = & final_ty. kind {
20352035 final_ty = ty;
20362036 }
20372037 final_ty
@@ -2058,7 +2058,7 @@ pub enum TyKind {
20582058 /// A raw pointer (`*const T` or `*mut T`).
20592059 Ptr ( MutTy ) ,
20602060 /// A reference (`&'a T` or `&'a mut T`).
2061- Rptr ( Option < Lifetime > , MutTy ) ,
2061+ Ref ( Option < Lifetime > , MutTy ) ,
20622062 /// A bare function (e.g., `fn(usize) -> bool`).
20632063 BareFn ( P < BareFnTy > ) ,
20642064 /// The never type (`!`).
@@ -2286,7 +2286,7 @@ impl Param {
22862286 if ident. name == kw:: SelfLower {
22872287 return match self . ty . kind {
22882288 TyKind :: ImplicitSelf => Some ( respan ( self . pat . span , SelfKind :: Value ( mutbl) ) ) ,
2289- TyKind :: Rptr ( lt, MutTy { ref ty, mutbl } ) if ty. kind . is_implicit_self ( ) => {
2289+ TyKind :: Ref ( lt, MutTy { ref ty, mutbl } ) if ty. kind . is_implicit_self ( ) => {
22902290 Some ( respan ( self . pat . span , SelfKind :: Region ( lt, mutbl) ) )
22912291 }
22922292 _ => Some ( respan (
@@ -2319,7 +2319,7 @@ impl Param {
23192319 Mutability :: Not ,
23202320 P ( Ty {
23212321 id : DUMMY_NODE_ID ,
2322- kind : TyKind :: Rptr ( lt, MutTy { ty : infer_ty, mutbl } ) ,
2322+ kind : TyKind :: Ref ( lt, MutTy { ty : infer_ty, mutbl } ) ,
23232323 span,
23242324 tokens : None ,
23252325 } ) ,
0 commit comments