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