make precise capturing args in rustdoc Json typed

This commit is contained in:
morine0122 2025-03-02 18:06:06 +09:00
parent cdd8af2299
commit 112f7b01a1
11 changed files with 96 additions and 20 deletions

View file

@ -3368,13 +3368,16 @@ pub struct OpaqueTy<'hir> {
pub span: Span,
}
#[derive(Debug, Clone, Copy, HashStable_Generic)]
pub enum PreciseCapturingArg<'hir> {
Lifetime(&'hir Lifetime),
#[derive(Debug, Clone, Copy, HashStable_Generic, Encodable, Decodable)]
pub enum PreciseCapturingArgKind<T, U> {
Lifetime(T),
/// Non-lifetime argument (type or const)
Param(PreciseCapturingNonLifetimeArg),
Param(U),
}
pub type PreciseCapturingArg<'hir> =
PreciseCapturingArgKind<&'hir Lifetime, PreciseCapturingNonLifetimeArg>;
impl PreciseCapturingArg<'_> {
pub fn hir_id(self) -> HirId {
match self {