1
Fork 0

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:
Matthias Krüger 2022-12-29 13:16:04 +01:00 committed by GitHub
commit c610aeb592
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
57 changed files with 93 additions and 97 deletions

View file

@ -1229,7 +1229,7 @@ impl<'a> Parser<'a> {
let sum_span = ty.span.to(self.prev_token.span);
let sub = match &ty.kind {
TyKind::Rptr(lifetime, mut_ty) => {
TyKind::Ref(lifetime, mut_ty) => {
let sum_with_parens = pprust::to_string(|s| {
s.s.word("&");
s.print_opt_lifetime(lifetime);

View file

@ -504,7 +504,7 @@ impl<'a> Parser<'a> {
self.bump_with((dyn_tok, dyn_tok_sp));
}
let ty = self.parse_ty_no_plus()?;
Ok(TyKind::Rptr(opt_lifetime, MutTy { ty, mutbl }))
Ok(TyKind::Ref(opt_lifetime, MutTy { ty, mutbl }))
}
// Parses the `typeof(EXPR)`.