Skip to content

Commit 67b78a0

Browse files
committed
Update crate name and add README
1 parent 3076e25 commit 67b78a0

File tree

6 files changed

+24
-12
lines changed

6 files changed

+24
-12
lines changed

Cargo.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,13 +1637,6 @@ version = "0.11.15"
16371637
source = "registry+https://github.com/rust-lang/crates.io-index"
16381638
checksum = "92c245af8786f6ac35f95ca14feca9119e71339aaab41e878e7cdd655c97e9e5"
16391639

1640-
[[package]]
1641-
name = "json-types"
1642-
version = "0.1.0"
1643-
dependencies = [
1644-
"serde",
1645-
]
1646-
16471640
[[package]]
16481641
name = "jsondocck"
16491642
version = "0.1.0"
@@ -4393,17 +4386,24 @@ version = "0.0.0"
43934386
dependencies = [
43944387
"expect-test",
43954388
"itertools 0.9.0",
4396-
"json-types",
43974389
"minifier",
43984390
"pulldown-cmark 0.8.0",
43994391
"regex",
44004392
"rustc-rayon",
4393+
"rustdoc-json-types",
44014394
"serde",
44024395
"serde_json",
44034396
"smallvec 1.4.2",
44044397
"tempfile",
44054398
]
44064399

4400+
[[package]]
4401+
name = "rustdoc-json-types"
4402+
version = "0.1.0"
4403+
dependencies = [
4404+
"serde",
4405+
]
4406+
44074407
[[package]]
44084408
name = "rustdoc-themes"
44094409
version = "0.1.0"

src/librustdoc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ smallvec = "1.0"
1717
tempfile = "3"
1818
itertools = "0.9"
1919
regex = "1"
20-
json-types = { path = "../rustdoc-json-types" }
20+
rustdoc-json-types = { path = "../rustdoc-json-types" }
2121

2222
[dev-dependencies]
2323
expect-test = "1.0"

src/librustdoc/json/conversions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_hir::def::CtorKind;
99
use rustc_span::def_id::{DefId, CRATE_DEF_INDEX};
1010
use rustc_span::Pos;
1111

12-
use json_types::*;
12+
use rustdoc_json_types::*;
1313

1414
use crate::clean;
1515
use crate::formats::item_type::ItemType;

src/librustdoc/json/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use rustc_middle::ty::TyCtxt;
1616
use rustc_session::Session;
1717
use rustc_span::edition::Edition;
1818

19-
use json_types as types;
19+
use rustdoc_json_types as types;
2020

2121
use crate::clean;
2222
use crate::config::{RenderInfo, RenderOptions};

src/rustdoc-json-types/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "json-types"
2+
name = "rustdoc-json-types"
33
version = "0.1.0"
44
authors = ["The Rust Project Developers"]
55
edition = "2018"

src/rustdoc-json-types/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Rustdoc JSON Types
2+
3+
This crate exposes the Rustdoc JSON API as a set of types with serde implementations.
4+
These types are part of the public interface of the rustdoc JSON output, and making them
5+
their own crate allows them to be versioned and distributed without having to depend on
6+
any rustc/rustdoc internals. This way, consumers can rely on this crate for both documentation
7+
of the output, and as a way to read the output easily, and its versioning is intended to
8+
follow semver guarantees about the version of the format. JSON format X will always be
9+
compatible with rustdoc-json-types version N.
10+
11+
Currently, this crate is only used by rustdoc itself. Upon the stabilization of
12+
rustdoc-json, it may be start to be distributed separately for consumers of the API.

0 commit comments

Comments
 (0)