@@ -29,7 +29,7 @@ use serde::{Deserialize, Serialize};
29
29
/// This integer is incremented with every breaking change to the API,
30
30
/// and is returned along with the JSON blob as [`Crate::format_version`].
31
31
/// Consuming code should assert that this value matches the format version(s) that it supports.
32
- pub const FORMAT_VERSION : u32 = 40 ;
32
+ pub const FORMAT_VERSION : u32 = 41 ;
33
33
34
34
/// The root of the emitted JSON blob.
35
35
///
@@ -908,7 +908,7 @@ pub enum GenericBound {
908
908
/// ```
909
909
Outlives ( String ) ,
910
910
/// `use<'a, T>` precise-capturing bound syntax
911
- Use ( Vec < String > ) ,
911
+ Use ( Vec < PreciseCapturingArg > ) ,
912
912
}
913
913
914
914
/// A set of modifiers applied to a trait.
@@ -926,6 +926,22 @@ pub enum TraitBoundModifier {
926
926
MaybeConst ,
927
927
}
928
928
929
+ /// One precise capturing argument. See [the rust reference](https://doc.rust-lang.org/reference/types/impl-trait.html#precise-capturing).
930
+ #[ derive( Clone , Debug , PartialEq , Eq , Hash , Serialize , Deserialize ) ]
931
+ #[ serde( rename_all = "snake_case" ) ]
932
+ pub enum PreciseCapturingArg {
933
+ /// A lifetime.
934
+ /// ```rust
935
+ /// pub fn hello<'a, T, const N: usize>() -> impl Sized + use<'a, T, N> {}
936
+ /// // ^^
937
+ Lifetime ( String ) ,
938
+ /// A type or constant parameter.
939
+ /// ```rust
940
+ /// pub fn hello<'a, T, const N: usize>() -> impl Sized + use<'a, T, N> {}
941
+ /// // ^ ^
942
+ Param ( String ) ,
943
+ }
944
+
929
945
/// Either a type or a constant, usually stored as the right-hand side of an equation in places like
930
946
/// [`AssocItemConstraint`]
931
947
#[ derive( Clone , Debug , PartialEq , Eq , Hash , Serialize , Deserialize ) ]
0 commit comments