11# Rustdoc Types
22
3- [ Docs] ( https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc_json_types/index.html )
3+ [ Docs] ( https://docs.rs/rustdoc-types/latest/rustdoc_types/ )
44
5- This is an export of [ ` rustdoc-json-types ` ] ( https://github.com/rust-lang/rust/blob/master/src/rustdoc-json-types/lib.rs )
5+ This crate contains the type definiions for rustdoc's currently-unstable
6+ ` --output-format=json ` flag. They can be deserialized with ` serde-json ` from
7+ the output of ` cargo +nightly rustdoc -- --output-format json -Z unstable-options ` :
68
7- ## Release Procedure
9+ ``` rust
10+ let json_string = std :: fs :: read_to_string (" ./target/doc/rustdoc_types.json" )? ;
11+ let krate : rustdoc_types :: Crate = serde_json :: from_str (& json_string )? ;
12+
13+ println! (" the index has {} items" , krate . index. len ());
14+ ```
15+
16+ ## Contributing
17+
18+ This repo is a reexport of
19+ [ ` rustdoc-json-types ` ] ( https://github.com/rust-lang/rust/blob/master/src/rustdoc-json-types/lib.rs )
20+ from the rust repo. Any change to the contents of [ ` src/ ` ] ( src/ ) , should be sent
21+ to [ ` rust-lang/rust ` ] ( https://github.com/rust-lang/rust/ ) , via their [ normal
22+ contibution
23+ procudures] ( https://rustc-dev-guide.rust-lang.org/contributing.html ) . Once
24+ reviewed and merged there, the change will be pulled to this repo and published
25+ to crates.io.
26+
27+ ### Release Procedure
828
9291 . Run ` ./update.sh ` to pull code from upstream
10302 . Run ` cargo test `
11313 . Run ` ./clgen.sh <old_version> <new_version> `
12- 4 . Follow instructions to commit and push.
32+ 4 . Follow printed instructions to commit and push.
1333
1434## License
1535
@@ -22,7 +42,7 @@ Licensed under either of
2242
2343at your option.
2444
25- ## Contribution
45+ ### Contribution
2646
2747Unless you explicitly state otherwise, any contribution intentionally submitted
2848for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
0 commit comments