Lower AST and resolve lifetimes for unsafe binder types

This commit is contained in:
Michael Goulet
2024-12-10 20:10:56 +00:00
parent 3b1adfa94b
commit 2a9e358c72
9 changed files with 98 additions and 0 deletions

View File

@@ -2780,6 +2780,12 @@ pub struct BareFnTy<'hir> {
pub param_names: &'hir [Ident],
}
#[derive(Debug, Clone, Copy, HashStable_Generic)]
pub struct UnsafeBinderTy<'hir> {
pub generic_params: &'hir [GenericParam<'hir>],
pub inner_ty: &'hir Ty<'hir>,
}
#[derive(Debug, Clone, Copy, HashStable_Generic)]
pub struct OpaqueTy<'hir> {
pub hir_id: HirId,
@@ -2878,6 +2884,8 @@ pub enum TyKind<'hir> {
Ref(&'hir Lifetime, MutTy<'hir>),
/// A bare function (e.g., `fn(usize) -> bool`).
BareFn(&'hir BareFnTy<'hir>),
/// Uwu
UnsafeBinder(&'hir UnsafeBinderTy<'hir>),
/// The never type (`!`).
Never,
/// A tuple (`(A, B, C, D, ...)`).