@@ -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 = 38 ;
32
+ pub const FORMAT_VERSION : u32 = 39 ;
33
33
34
34
/// The root of the emitted JSON blob.
35
35
///
@@ -1035,16 +1035,20 @@ pub enum Type {
1035
1035
/// A type that has a simple path to it. This is the kind of type of structs, unions, enums, etc.
1036
1036
#[ derive( Clone , Debug , PartialEq , Eq , Hash , Serialize , Deserialize ) ]
1037
1037
pub 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.
1039
1043
///
1040
1044
/// ```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"
1044
1048
/// ```
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 ,
1048
1052
/// The ID of the type.
1049
1053
pub id : Id ,
1050
1054
/// Generic arguments to the type.
@@ -1098,8 +1102,7 @@ pub struct Trait {
1098
1102
pub is_auto : bool ,
1099
1103
/// Whether the trait is marked as `unsafe`.
1100
1104
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].
1103
1106
///
1104
1107
/// [^1]: Formerly known as "object safe".
1105
1108
pub is_dyn_compatible : bool ,
0 commit comments