1
Fork 0

Parsing unsafe binders

This commit is contained in:
Michael Goulet 2024-08-30 17:01:28 -04:00
parent 8e37e15183
commit 3b1adfa94b
6 changed files with 45 additions and 1 deletions

View file

@ -2223,6 +2223,12 @@ pub struct BareFnTy {
pub decl_span: Span,
}
#[derive(Clone, Encodable, Decodable, Debug)]
pub struct UnsafeBinderTy {
pub generic_params: ThinVec<GenericParam>,
pub inner_ty: P<Ty>,
}
/// The various kinds of type recognized by the compiler.
//
// Adding a new variant? Please update `test_ty` in `tests/ui/macros/stringify.rs`.
@ -2242,6 +2248,8 @@ pub enum TyKind {
PinnedRef(Option<Lifetime>, MutTy),
/// A bare function (e.g., `fn(usize) -> bool`).
BareFn(P<BareFnTy>),
/// An unsafe existential lifetime binder (e.g., `unsafe<'a> &'a ()`).
UnsafeBinder(P<UnsafeBinderTy>),
/// The never type (`!`).
Never,
/// A tuple (`(A, B, C, D,...)`).