Parsing unsafe binders
This commit is contained in:
parent
8e37e15183
commit
3b1adfa94b
6 changed files with 45 additions and 1 deletions
|
@ -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,...)`).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue