Lower and resolve precise captures in HIR

This commit is contained in:
Michael Goulet
2024-04-04 10:48:47 -04:00
parent c897092654
commit 41cf87b71b
8 changed files with 108 additions and 46 deletions

View File

@@ -2557,6 +2557,15 @@ pub struct OpaqueTy<'hir> {
/// originating from a trait method. This makes it so that the opaque is
/// lowered as an associated type.
pub in_trait: bool,
/// List of arguments captured via `impl use<'a, P, ...> Trait` syntax.
pub precise_capturing_args: Option<&'hir [PreciseCapturingArg<'hir>]>,
}
#[derive(Debug, Clone, Copy, HashStable_Generic)]
pub enum PreciseCapturingArg<'hir> {
Lifetime(&'hir Lifetime),
/// Non-lifetime argument (type or const)
Param(Res, HirId),
}
/// From whence the opaque type came.