Delegation implementation: step 1

This commit is contained in:
Bryanskiy
2023-11-26 15:57:31 +03:00
parent 2b1365b34f
commit d69cd6473c
50 changed files with 1634 additions and 93 deletions

View File

@@ -2571,9 +2571,17 @@ pub enum OpaqueTyOrigin {
},
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, HashStable_Generic)]
pub enum InferDelegationKind {
Input(usize),
Output,
}
/// The various kinds of types recognized by the compiler.
#[derive(Debug, Clone, Copy, HashStable_Generic)]
pub enum TyKind<'hir> {
/// Actual type should be inherited from `DefId` signature
InferDelegation(DefId, InferDelegationKind),
/// A variable length slice (i.e., `[T]`).
Slice(&'hir Ty<'hir>),
/// A fixed length array (i.e., `[T; n]`).