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 | 9067e4417e52643596ae8dbc4ec6369a0d856b45 (patch) | |
| tree | c2a5b6d238110bb40a1a06db2f288e01f4e1b9c0 /compiler/rustc_builtin_macros/src | |
| parent | a1fc71196a5554eafc5dd9a1b4e0c159717141e0 (diff) | |
| download | rust-9067e4417e52643596ae8dbc4ec6369a0d856b45.tar.gz rust-9067e4417e52643596ae8dbc4ec6369a0d856b45.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.
Diffstat (limited to 'compiler/rustc_builtin_macros/src')
4 files changed, 6 insertions, 7 deletions
diff --git a/compiler/rustc_builtin_macros/src/deriving/debug.rs b/compiler/rustc_builtin_macros/src/deriving/debug.rs index 544d971b27a..5b1b7e6804c 100644 --- a/compiler/rustc_builtin_macros/src/deriving/debug.rs +++ b/compiler/rustc_builtin_macros/src/deriving/debug.rs @@ -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), ); diff --git a/compiler/rustc_builtin_macros/src/deriving/generic/ty.rs b/compiler/rustc_builtin_macros/src/deriving/generic/ty.rs index eaa4881906a..c6f5f5d0807 100644 --- a/compiler/rustc_builtin_macros/src/deriving/generic/ty.rs +++ b/compiler/rustc_builtin_macros/src/deriving/generic/ty.rs @@ -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)), diff --git a/compiler/rustc_builtin_macros/src/env.rs b/compiler/rustc_builtin_macros/src/env.rs index a7283ea601b..84d06b69a9d 100644 --- a/compiler/rustc_builtin_macros/src/env.rs +++ b/compiler/rustc_builtin_macros/src/env.rs @@ -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), diff --git a/compiler/rustc_builtin_macros/src/proc_macro_harness.rs b/compiler/rustc_builtin_macros/src/proc_macro_harness.rs index b88de224675..21c8caa658f 100644 --- a/compiler/rustc_builtin_macros/src/proc_macro_harness.rs +++ b/compiler/rustc_builtin_macros/src/proc_macro_harness.rs @@ -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, |
