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
|
@ -117,8 +117,7 @@ fn show_substructure(cx: &mut ExtCtxt<'_>, span: Span, substr: &Substructure<'_>
|
|||
// `let names: &'static _ = &["field1", "field2"];`
|
||||
let names_let = if is_struct {
|
||||
let lt_static = Some(cx.lifetime_static(span));
|
||||
let ty_static_ref =
|
||||
cx.ty_rptr(span, cx.ty_infer(span), lt_static, ast::Mutability::Not);
|
||||
let ty_static_ref = cx.ty_ref(span, cx.ty_infer(span), lt_static, ast::Mutability::Not);
|
||||
Some(cx.stmt_let_ty(
|
||||
span,
|
||||
false,
|
||||
|
@ -138,13 +137,13 @@ fn show_substructure(cx: &mut ExtCtxt<'_>, span: Span, substr: &Substructure<'_>
|
|||
);
|
||||
let ty_slice = cx.ty(
|
||||
span,
|
||||
ast::TyKind::Slice(cx.ty_rptr(span, ty_dyn_debug, None, ast::Mutability::Not)),
|
||||
ast::TyKind::Slice(cx.ty_ref(span, ty_dyn_debug, None, ast::Mutability::Not)),
|
||||
);
|
||||
let values_let = cx.stmt_let_ty(
|
||||
span,
|
||||
false,
|
||||
Ident::new(sym::values, span),
|
||||
Some(cx.ty_rptr(span, ty_slice, None, ast::Mutability::Not)),
|
||||
Some(cx.ty_ref(span, ty_slice, None, ast::Mutability::Not)),
|
||||
cx.expr_array_ref(span, value_exprs),
|
||||
);
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ impl Ty {
|
|||
match self {
|
||||
Ref(ty, mutbl) => {
|
||||
let raw_ty = ty.to_ty(cx, span, self_ty, self_generics);
|
||||
cx.ty_rptr(span, raw_ty, None, *mutbl)
|
||||
cx.ty_ref(span, raw_ty, None, *mutbl)
|
||||
}
|
||||
Path(p) => p.to_ty(cx, span, self_ty, self_generics),
|
||||
Self_ => cx.ty_path(self.to_path(cx, span, self_ty, self_generics)),
|
||||
|
|
|
@ -30,7 +30,7 @@ pub fn expand_option_env<'cx>(
|
|||
sp,
|
||||
true,
|
||||
cx.std_path(&[sym::option, sym::Option, sym::None]),
|
||||
vec![GenericArg::Type(cx.ty_rptr(
|
||||
vec![GenericArg::Type(cx.ty_ref(
|
||||
sp,
|
||||
cx.ty_ident(sp, Ident::new(sym::str, sp)),
|
||||
Some(lt),
|
||||
|
|
|
@ -349,7 +349,7 @@ fn mk_decls(cx: &mut ExtCtxt<'_>, macros: &[ProcMacro]) -> P<ast::Item> {
|
|||
.item_static(
|
||||
span,
|
||||
Ident::new(sym::_DECLS, span),
|
||||
cx.ty_rptr(
|
||||
cx.ty_ref(
|
||||
span,
|
||||
cx.ty(
|
||||
span,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue