Skip to content

Commit 209c069

Browse files
committed
rustdoc: generate JSON via serde
1 parent e79b2a1 commit 209c069

File tree

9 files changed

+237
-193
lines changed

9 files changed

+237
-193
lines changed

Cargo.lock

+2
Original file line numberDiff line numberDiff line change
@@ -3186,6 +3186,8 @@ dependencies = [
31863186
"minifier 0.0.30 (registry+https://github.com/rust-lang/crates.io-index)",
31873187
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
31883188
"pulldown-cmark 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
3189+
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
3190+
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
31893191
"tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
31903192
]
31913193

src/librustdoc/Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ path = "lib.rs"
1111
[dependencies]
1212
pulldown-cmark = { version = "0.5.2", default-features = false }
1313
minifier = "0.0.30"
14+
serde = { version = "1.0.82", features = ["derive"] }
15+
serde_json = "1.0.33"
1416
tempfile = "3"
1517
parking_lot = "0.7"

src/librustdoc/clean/cfg.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use syntax_pos::Span;
1616

1717
use crate::html::escape::Escape;
1818

19-
#[derive(Clone, RustcEncodable, RustcDecodable, Debug, PartialEq, Eq, Hash)]
19+
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
2020
pub enum Cfg {
2121
/// Accepts all configurations.
2222
True,

0 commit comments

Comments
 (0)