diff options
| author | Michael Goulet <michael@errs.io> | 2024-05-13 15:22:47 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-05-13 22:45:01 -0400 |
| commit | 9f8cdb286ec2660c7abe65f687bb29cb0b207fa5 (patch) | |
| tree | 236d695f88d7e4bc0efccb129ec7099e05f7380e | |
| parent | 1ad28a6f534d7673664e8f26c632bc71490c33a6 (diff) | |
| download | rust-9f8cdb286ec2660c7abe65f687bb29cb0b207fa5.tar.gz rust-9f8cdb286ec2660c7abe65f687bb29cb0b207fa5.zip | |
Remove to_term
| -rw-r--r-- | compiler/rustc_middle/src/ty/consts.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/sty.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_type_ir/src/inherent.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_type_ir/src/predicate.rs | 10 |
4 files changed, 7 insertions, 17 deletions
diff --git a/compiler/rustc_middle/src/ty/consts.rs b/compiler/rustc_middle/src/ty/consts.rs index 27a4abaa0b6..9dc30447f0e 100644 --- a/compiler/rustc_middle/src/ty/consts.rs +++ b/compiler/rustc_middle/src/ty/consts.rs @@ -195,10 +195,6 @@ impl<'tcx> rustc_type_ir::inherent::Const<TyCtxt<'tcx>> for Const<'tcx> { fn ty(self) -> Ty<'tcx> { self.ty() } - - fn into_term(self) -> ty::Term<'tcx> { - self.into() - } } impl<'tcx> Const<'tcx> { diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index e4396c6f20b..74b03d6db66 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -1660,10 +1660,6 @@ impl<'tcx> rustc_type_ir::inherent::Ty<TyCtxt<'tcx>> for Ty<'tcx> { ) -> Self { Ty::new_alias(interner, kind, alias_ty) } - - fn into_term(self) -> ty::Term<'tcx> { - self.into() - } } /// Type utilities diff --git a/compiler/rustc_type_ir/src/inherent.rs b/compiler/rustc_type_ir/src/inherent.rs index 0a964801ce7..92b1e08ab0a 100644 --- a/compiler/rustc_type_ir/src/inherent.rs +++ b/compiler/rustc_type_ir/src/inherent.rs @@ -15,6 +15,7 @@ pub trait Ty<I: Interner<Ty = Self>>: + Hash + Eq + Into<I::GenericArg> + + Into<I::Term> + IntoKind<Kind = TyKind<I>> + TypeSuperVisitable<I> + TypeSuperFoldable<I> @@ -23,8 +24,6 @@ pub trait Ty<I: Interner<Ty = Self>>: fn new_anon_bound(interner: I, debruijn: DebruijnIndex, var: BoundVar) -> Self; fn new_alias(interner: I, kind: AliasTyKind, alias_ty: AliasTy<I>) -> Self; - - fn into_term(self) -> I::Term; } pub trait Region<I: Interner<Region = Self>>: @@ -41,6 +40,7 @@ pub trait Const<I: Interner<Const = Self>>: + Hash + Eq + Into<I::GenericArg> + + Into<I::Term> + IntoKind<Kind = ConstKind<I>> + TypeSuperVisitable<I> + TypeSuperFoldable<I> @@ -51,8 +51,6 @@ pub trait Const<I: Interner<Const = Self>>: fn new_unevaluated(interner: I, uv: UnevaluatedConst<I>, ty: I::Ty) -> Self; fn ty(self) -> I::Ty; - - fn into_term(self) -> I::Term; } pub trait GenericsOf<I: Interner<GenericsOf = Self>> { diff --git a/compiler/rustc_type_ir/src/predicate.rs b/compiler/rustc_type_ir/src/predicate.rs index 1ec237d7cd5..b6c7c2c348c 100644 --- a/compiler/rustc_type_ir/src/predicate.rs +++ b/compiler/rustc_type_ir/src/predicate.rs @@ -437,32 +437,32 @@ impl<I: Interner> AliasTerm<I> { AliasTyKind::Projection, AliasTy { def_id: self.def_id, args: self.args, _use_alias_ty_new_instead: () }, ) - .into_term(), + .into(), AliasTermKind::InherentTy => Ty::new_alias( interner, AliasTyKind::Inherent, AliasTy { def_id: self.def_id, args: self.args, _use_alias_ty_new_instead: () }, ) - .into_term(), + .into(), AliasTermKind::OpaqueTy => Ty::new_alias( interner, AliasTyKind::Opaque, AliasTy { def_id: self.def_id, args: self.args, _use_alias_ty_new_instead: () }, ) - .into_term(), + .into(), AliasTermKind::WeakTy => Ty::new_alias( interner, AliasTyKind::Weak, AliasTy { def_id: self.def_id, args: self.args, _use_alias_ty_new_instead: () }, ) - .into_term(), + .into(), AliasTermKind::UnevaluatedConst | AliasTermKind::ProjectionConst => { I::Const::new_unevaluated( interner, UnevaluatedConst::new(self.def_id, self.args), interner.type_of_instantiated(self.def_id, self.args), ) - .into_term() + .into() } } } |
