You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of #81287 - CraftSpider:json-crate, r=jyn514,GuillaumeGomez
Split rustdoc JSON types into separately versioned crate
For now just an in-tree change.
In the future, this may be exposed as a standalone crate with standard semver.
Copy file name to clipboardExpand all lines: src/rustdoc-json-types/lib.rs
+5-5
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,9 @@
3
3
//! These types are the public API exposed through the `--output-format json` flag. The [`Crate`]
4
4
//! struct is the root of the JSON blob and all other items are contained within.
5
5
6
+
use std::collections::HashMap;
6
7
use std::path::PathBuf;
7
8
8
-
use rustc_data_structures::fx::FxHashMap;
9
9
use serde::{Deserialize,Serialize};
10
10
11
11
/// A `Crate` is the root of the emitted JSON blob. It contains all type/documentation information
@@ -21,11 +21,11 @@ pub struct Crate {
21
21
pubincludes_private:bool,
22
22
/// A collection of all items in the local crate as well as some external traits and their
23
23
/// items that are referenced locally.
24
-
pubindex:FxHashMap<Id,Item>,
24
+
pubindex:HashMap<Id,Item>,
25
25
/// Maps IDs to fully qualified paths and other info helpful for generating links.
26
-
pubpaths:FxHashMap<Id,ItemSummary>,
26
+
pubpaths:HashMap<Id,ItemSummary>,
27
27
/// Maps `crate_id` of items to a crate name and html_root_url if it exists.
28
-
pubexternal_crates:FxHashMap<u32,ExternalCrate>,
28
+
pubexternal_crates:HashMap<u32,ExternalCrate>,
29
29
/// A single version number to be used in the future when making backwards incompatible changes
30
30
/// to the JSON output.
31
31
pubformat_version:u32,
@@ -72,7 +72,7 @@ pub struct Item {
72
72
/// Some("") if there is some documentation but it is empty (EG `#[doc = ""]`).
73
73
pubdocs:Option<String>,
74
74
/// This mapping resolves [intra-doc links](https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md) from the docstring to their IDs
75
-
publinks:FxHashMap<String,Id>,
75
+
publinks:HashMap<String,Id>,
76
76
/// Stringified versions of the attributes on this item (e.g. `"#[inline]"`)
0 commit comments