diff options
| author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2022-12-28 18:06:11 +0100 |
|---|---|---|
| committer | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2022-12-28 18:52:36 +0100 |
| commit | ac8eaa1ba7a5e6887b45bbd84d9a583fac6e39c9 (patch) | |
| tree | 3032d7cfc181f70aa58b8b5992ff0dfeb17fe7db | |
| parent | 53ca2598d3156b420931e5bcedbf49baeba0a68c (diff) | |
| download | rust-ac8eaa1ba7a5e6887b45bbd84d9a583fac6e39c9.tar.gz rust-ac8eaa1ba7a5e6887b45bbd84d9a583fac6e39c9.zip | |
Rename `Rptr` to `Ref` in AST and HIR
The name makes a lot more sense, and `ty::TyKind` calls it `Ref` already as well.
| -rw-r--r-- | src/types.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/types.rs b/src/types.rs index d5177a2057b..c1991e8d2c8 100644 --- a/src/types.rs +++ b/src/types.rs @@ -688,7 +688,7 @@ impl Rewrite for ast::Ty { rewrite_unary_prefix(context, prefix, &*mt.ty, shape) } - ast::TyKind::Rptr(ref lifetime, ref mt) => { + ast::TyKind::Ref(ref lifetime, ref mt) => { let mut_str = format_mutability(mt.mutbl); let mut_len = mut_str.len(); let mut result = String::with_capacity(128); @@ -1059,7 +1059,7 @@ pub(crate) fn can_be_overflowed_type( ) -> bool { match ty.kind { ast::TyKind::Tup(..) => context.use_block_indent() && len == 1, - ast::TyKind::Rptr(_, ref mutty) | ast::TyKind::Ptr(ref mutty) => { + ast::TyKind::Ref(_, ref mutty) | ast::TyKind::Ptr(ref mutty) => { can_be_overflowed_type(context, &*mutty.ty, len) } _ => false, |
