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:
parent
a1fc71196a
commit
9067e4417e
57 changed files with 93 additions and 97 deletions
|
@ -2657,7 +2657,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
|||
hir::TyKind::Ptr(ref mt) => {
|
||||
tcx.mk_ptr(ty::TypeAndMut { ty: self.ast_ty_to_ty(mt.ty), mutbl: mt.mutbl })
|
||||
}
|
||||
hir::TyKind::Rptr(ref region, ref mt) => {
|
||||
hir::TyKind::Ref(ref region, ref mt) => {
|
||||
let r = self.ast_region_to_region(region, None);
|
||||
debug!(?r);
|
||||
let t = self.ast_ty_to_ty_inner(mt.ty, true, false);
|
||||
|
|
|
@ -291,7 +291,7 @@ fn check_trait_item(tcx: TyCtxt<'_>, trait_item: &hir::TraitItem<'_>) {
|
|||
// Do some rudimentary sanity checking to avoid an ICE later (issue #83471).
|
||||
if let Some(hir::FnSig { decl, span, .. }) = method_sig {
|
||||
if let [self_ty, _] = decl.inputs {
|
||||
if !matches!(self_ty.kind, hir::TyKind::Rptr(_, _)) {
|
||||
if !matches!(self_ty.kind, hir::TyKind::Ref(_, _)) {
|
||||
tcx.sess
|
||||
.struct_span_err(
|
||||
self_ty.span,
|
||||
|
|
|
@ -1059,7 +1059,7 @@ fn is_suggestable_infer_ty(ty: &hir::Ty<'_>) -> bool {
|
|||
is_suggestable_infer_ty(ty) || matches!(length, hir::ArrayLen::Infer(_, _))
|
||||
}
|
||||
Tup(tys) => tys.iter().any(is_suggestable_infer_ty),
|
||||
Ptr(mut_ty) | Rptr(_, mut_ty) => is_suggestable_infer_ty(mut_ty.ty),
|
||||
Ptr(mut_ty) | Ref(_, mut_ty) => is_suggestable_infer_ty(mut_ty.ty),
|
||||
OpaqueDef(_, generic_args, _) => are_suggestable_generic_args(generic_args),
|
||||
Path(hir::QPath::TypeRelative(ty, segment)) => {
|
||||
is_suggestable_infer_ty(ty) || are_suggestable_generic_args(segment.args().args)
|
||||
|
|
|
@ -617,7 +617,7 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
|
|||
LifetimeName::Error => {}
|
||||
}
|
||||
}
|
||||
hir::TyKind::Rptr(ref lifetime_ref, ref mt) => {
|
||||
hir::TyKind::Ref(ref lifetime_ref, ref mt) => {
|
||||
self.visit_lifetime(lifetime_ref);
|
||||
let scope = Scope::ObjectLifetimeDefault {
|
||||
lifetime: self.map.defs.get(&lifetime_ref.hir_id).cloned(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue