@@ -30,7 +30,7 @@ pub type FxHashMap<K, V> = HashMap<K, V>; // re-export for use in src/librustdoc
3030/// This integer is incremented with every breaking change to the API,
3131/// and is returned along with the JSON blob as [`Crate::format_version`].
3232/// 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 ;
3434
3535/// The root of the emitted JSON blob.
3636///
@@ -909,7 +909,7 @@ pub enum GenericBound {
909909 /// ```
910910 Outlives ( String ) ,
911911 /// `use<'a, T>` precise-capturing bound syntax
912- Use ( Vec < String > ) ,
912+ Use ( Vec < PreciseCapturingArg > ) ,
913913}
914914
915915/// A set of modifiers applied to a trait.
@@ -927,6 +927,22 @@ pub enum TraitBoundModifier {
927927 MaybeConst ,
928928}
929929
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+
930946/// Either a type or a constant, usually stored as the right-hand side of an equation in places like
931947/// [`AssocItemConstraint`]
932948#[ derive( Clone , Debug , PartialEq , Eq , Hash , Serialize , Deserialize ) ]
0 commit comments