1
1
# Rustdoc Types
2
2
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/ )
4
4
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 ` :
6
8
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
8
28
9
29
1 . Run ` ./update.sh ` to pull code from upstream
10
30
2 . Run ` cargo test `
11
31
3 . Run ` ./clgen.sh <old_version> <new_version> `
12
- 4 . Follow instructions to commit and push.
32
+ 4 . Follow printed instructions to commit and push.
13
33
14
34
## License
15
35
@@ -22,7 +42,7 @@ Licensed under either of
22
42
23
43
at your option.
24
44
25
- ## Contribution
45
+ ### Contribution
26
46
27
47
Unless you explicitly state otherwise, any contribution intentionally submitted
28
48
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
0 commit comments