Skip to content

Commit 3613413

Browse files
committed
v0.35.0
1 parent 6577cda commit 3613413

File tree

4 files changed

+29
-13
lines changed

4 files changed

+29
-13
lines changed

CHANGELOG.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
<a name="v0.35.0"></a>
2+
# [v0.35.0](https://github.com/aDotInTheVoid/rustdoc-types/releases/tag/v0.35.0) - 2025-01-24
3+
4+
**Breaking Change**: Rename the `Path::name` field to `Path::path`, and make it
5+
have the entire path. This effectively reverts the [previous release](#v0.34.0),
6+
as it was [not possible for many consumers to
7+
migrate](https://github.com/rust-lang/rust/issues/135600)
8+
([rust#135799](https://github.com/rust-lang/rust/pull/135799)).
9+
10+
- Format Version: 39
11+
- Upstream Commit: [`40e28582bb95e33f762dea75b78f6ebb5c29b836`](https://github.com/rust-lang/rust/commit/40e28582bb95e33f762dea75b78f6ebb5c29b836)
12+
- Diff: [v0.34.0...v0.35.0](https://github.com/aDotInTheVoid/rustdoc-types/compare/v0.34.0...v0.35.0)
13+
114
<a name="v0.34.0"></a>
215
# [v0.34.0](https://github.com/aDotInTheVoid/rustdoc-types/releases/tag/v0.34.0) - 2025-01-15
316

@@ -7,7 +20,7 @@ the full path. Users needing the full path can find it in the `Crate::paths` map
720

821
No changes were made to the schema (i.e. the public api for this crate is
922
unchanged), but the format version has been bumped, as this may effect consuming
10-
tools regardless.
23+
tools regardless.
1124

1225
- Format Version: 38
1326
- Upstream Commit: [`2c4aee92fa65e74f23ad7853937db8d2c4bfa6c8`](https://github.com/rust-lang/rust/commit/2c4aee92fa65e74f23ad7853937db8d2c4bfa6c8)

COMMIT.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2c4aee92fa65e74f23ad7853937db8d2c4bfa6c8
1+
40e28582bb95e33f762dea75b78f6ebb5c29b836

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rustdoc-types"
3-
version = "0.34.0"
3+
version = "0.35.0"
44
edition = "2018"
55
license = "MIT OR Apache-2.0"
66
description = "Types for rustdoc's json output"

src/lib.rs

+13-10
Original file line numberDiff line numberDiff line change
@@ -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)]
10371037
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.
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

Comments
 (0)