Skip to content

Commit 2ca9b2f

Browse files
authored
Rollup merge of #157419 - khyperia:term_kind_rs, r=BoxyUwU
move rustc_type_ir Term things to term_kind.rs - `TyKind`, `AliasTy`, and `AliasTyKind` live in `ty_kind.rs` - `ConstKind`, [`UnevaluatedConst`, and `UnevaluatedConstKind`](rust-lang/project-const-generics#115) live in `const_kind.rs` - `TermKind`, `AliasTerm`, and `AliasTermKind` live in... `generic_arg.rs` and `predicate.rs` ??? create a new file, `term_kind.rs`, that holds `TermKind`, `AliasTerm`, and `AliasTermKind` (note that `Ty`, `Const`, and `Term` live in `rustc_middle`, not `rustc_type_ir`)
2 parents bd6b858 + c0ea87e commit 2ca9b2f

5 files changed

Lines changed: 379 additions & 369 deletions

File tree

compiler/rustc_type_ir/src/generic_arg.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,3 @@ pub enum GenericArgKind<I: Interner> {
1818
}
1919

2020
impl<I: Interner> Eq for GenericArgKind<I> {}
21-
22-
#[derive_where(Clone, Copy, PartialEq, Debug; I: Interner)]
23-
#[derive(GenericTypeVisitable)]
24-
#[cfg_attr(
25-
feature = "nightly",
26-
derive(Decodable_NoContext, Encodable_NoContext, StableHash_NoContext)
27-
)]
28-
pub enum TermKind<I: Interner> {
29-
Ty(I::Ty),
30-
Const(I::Const),
31-
}
32-
33-
impl<I: Interner> Eq for TermKind<I> {}

compiler/rustc_type_ir/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ mod pattern;
5252
mod predicate;
5353
mod predicate_kind;
5454
mod region_kind;
55+
mod term_kind;
5556
mod ty;
5657
mod ty_info;
5758
mod ty_kind;
@@ -81,6 +82,7 @@ pub use predicate_kind::*;
8182
pub use region_kind::*;
8283
pub use rustc_ast_ir::{FloatTy, IntTy, Movability, Mutability, Pinnedness, UintTy};
8384
use rustc_type_ir_macros::GenericTypeVisitable;
85+
pub use term_kind::*;
8486
pub use ty::{Alias, *};
8587
pub use ty_info::*;
8688
pub use ty_kind::*;

0 commit comments

Comments
 (0)