@@ -572,7 +572,7 @@ impl Pat {
572
572
PatKind :: MacCall ( mac) => TyKind :: MacCall ( mac. clone ( ) ) ,
573
573
// `&mut? P` can be reinterpreted as `&mut? T` where `T` is `P` reparsed as a type.
574
574
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 } ) ) ?
576
576
}
577
577
// A slice/array pattern `[P]` can be reparsed as `[T]`, an unsized array,
578
578
// when `P` can be reparsed as a type `T`.
@@ -1193,7 +1193,7 @@ impl Expr {
1193
1193
ExprKind :: Paren ( expr) => expr. to_ty ( ) . map ( TyKind :: Paren ) ?,
1194
1194
1195
1195
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 } ) ) ?
1197
1197
}
1198
1198
1199
1199
ExprKind :: Repeat ( expr, expr_len) => {
@@ -2031,7 +2031,7 @@ impl Clone for Ty {
2031
2031
impl Ty {
2032
2032
pub fn peel_refs ( & self ) -> & Self {
2033
2033
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 {
2035
2035
final_ty = ty;
2036
2036
}
2037
2037
final_ty
@@ -2058,7 +2058,7 @@ pub enum TyKind {
2058
2058
/// A raw pointer (`*const T` or `*mut T`).
2059
2059
Ptr ( MutTy ) ,
2060
2060
/// A reference (`&'a T` or `&'a mut T`).
2061
- Rptr ( Option < Lifetime > , MutTy ) ,
2061
+ Ref ( Option < Lifetime > , MutTy ) ,
2062
2062
/// A bare function (e.g., `fn(usize) -> bool`).
2063
2063
BareFn ( P < BareFnTy > ) ,
2064
2064
/// The never type (`!`).
@@ -2286,7 +2286,7 @@ impl Param {
2286
2286
if ident. name == kw:: SelfLower {
2287
2287
return match self . ty . kind {
2288
2288
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 ( ) => {
2290
2290
Some ( respan ( self . pat . span , SelfKind :: Region ( lt, mutbl) ) )
2291
2291
}
2292
2292
_ => Some ( respan (
@@ -2319,7 +2319,7 @@ impl Param {
2319
2319
Mutability :: Not ,
2320
2320
P ( Ty {
2321
2321
id : DUMMY_NODE_ID ,
2322
- kind : TyKind :: Rptr ( lt, MutTy { ty : infer_ty, mutbl } ) ,
2322
+ kind : TyKind :: Ref ( lt, MutTy { ty : infer_ty, mutbl } ) ,
2323
2323
span,
2324
2324
tokens : None ,
2325
2325
} ) ,
0 commit comments