@@ -29,7 +29,7 @@ use serde::{Deserialize, Serialize};
2929/// This integer is incremented with every breaking change to the API,
3030/// and is returned along with the JSON blob as [`Crate::format_version`].
3131/// Consuming code should assert that this value matches the format version(s) that it supports.
32- pub const FORMAT_VERSION : u32 = 38 ;
32+ pub const FORMAT_VERSION : u32 = 39 ;
3333
3434/// The root of the emitted JSON blob.
3535///
@@ -1035,16 +1035,20 @@ pub enum Type {
10351035/// A type that has a simple path to it. This is the kind of type of structs, unions, enums, etc.
10361036#[ derive( Clone , Debug , PartialEq , Eq , Hash , Serialize , Deserialize ) ]
10371037pub struct Path {
1038- /// The name of the type as declared, e.g. in
1038+ /// The path of the type.
1039+ ///
1040+ /// This will be the path that is *used* (not where it is defined), so
1041+ /// multiple `Path`s may have different values for this field even if
1042+ /// they all refer to the same item. e.g.
10391043 ///
10401044 /// ```rust
1041- /// mod foo {
1042- /// struct Bar;
1043- /// }
1045+ /// pub type Vec1 = std::vec::Vec<i32>; // path: "std::vec::Vec"
1046+ /// pub type Vec2 = Vec<i32>; // path: "Vec"
1047+ /// pub type Vec3 = std::prelude::v1::Vec<i32>; // path: "std::prelude::v1::Vec"
10441048 /// ```
1045- ///
1046- /// for `foo::Bar`, this field will be `Bar`.
1047- pub name : String ,
1049+ //
1050+ // Example tested in ./tests/rustdoc-json/path_name.rs
1051+ pub path : String ,
10481052 /// The ID of the type.
10491053 pub id : Id ,
10501054 /// Generic arguments to the type.
@@ -1098,8 +1102,7 @@ pub struct Trait {
10981102 pub is_auto : bool ,
10991103 /// Whether the trait is marked as `unsafe`.
11001104 pub is_unsafe : bool ,
1101- // FIXME(dyn_compat_renaming): Update the URL once the Reference is updated and hits stable.
1102- /// Whether the trait is [dyn compatible](https://doc.rust-lang.org/reference/items/traits.html#object-safety)[^1].
1105+ /// Whether the trait is [dyn compatible](https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility)[^1].
11031106 ///
11041107 /// [^1]: Formerly known as "object safe".
11051108 pub is_dyn_compatible : bool ,
0 commit comments