Rollup merge of #106221 - Nilstrieb:rptr-more-like-ref-actually, r=compiler-errors
Rename `Rptr` to `Ref` in AST and HIR The name makes a lot more sense, and `ty::TyKind` calls it `Ref` already as well.
This commit is contained in:
commit
c610aeb592
57 changed files with 93 additions and 97 deletions
|
@ -2431,7 +2431,7 @@ impl<'hir> Ty<'hir> {
|
|||
|
||||
pub fn peel_refs(&self) -> &Self {
|
||||
let mut final_ty = self;
|
||||
while let TyKind::Rptr(_, MutTy { ty, .. }) = &final_ty.kind {
|
||||
while let TyKind::Ref(_, MutTy { ty, .. }) = &final_ty.kind {
|
||||
final_ty = ty;
|
||||
}
|
||||
final_ty
|
||||
|
@ -2588,7 +2588,7 @@ pub enum TyKind<'hir> {
|
|||
/// A raw pointer (i.e., `*const T` or `*mut T`).
|
||||
Ptr(MutTy<'hir>),
|
||||
/// A reference (i.e., `&'a T` or `&'a mut T`).
|
||||
Rptr(&'hir Lifetime, MutTy<'hir>),
|
||||
Ref(&'hir Lifetime, MutTy<'hir>),
|
||||
/// A bare function (e.g., `fn(usize) -> bool`).
|
||||
BareFn(&'hir BareFnTy<'hir>),
|
||||
/// The never type (`!`).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue