Rework precise capturing syntax
This commit is contained in:
@@ -463,6 +463,7 @@ pub enum TraitBoundModifier {
|
||||
pub enum GenericBound<'hir> {
|
||||
Trait(PolyTraitRef<'hir>, TraitBoundModifier),
|
||||
Outlives(&'hir Lifetime),
|
||||
Use(&'hir [PreciseCapturingArg<'hir>], Span),
|
||||
}
|
||||
|
||||
impl GenericBound<'_> {
|
||||
@@ -477,6 +478,7 @@ impl GenericBound<'_> {
|
||||
match self {
|
||||
GenericBound::Trait(t, ..) => t.span,
|
||||
GenericBound::Outlives(l) => l.ident.span,
|
||||
GenericBound::Use(_, span) => *span,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2689,8 +2691,6 @@ 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>], Span)>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, HashStable_Generic)]
|
||||
|
||||
Reference in New Issue
Block a user