1
1
//! Id handling for rustdoc-json.
2
2
//!
3
3
//! Manages the creation of [`rustdoc_json_types::Id`] and the
4
- //! fact that these don't corespond exactly to [`DefId`], because
5
- //! [`rustdoc_json_types::Item`] doesn't corespond exactly to what
6
- //! other phasises thing of as an "item".
4
+ //! fact that these don't correspond exactly to [`DefId`], because
5
+ //! [`rustdoc_json_types::Item`] doesn't correspond exactly to what
6
+ //! other phases think of as an "item".
7
7
8
8
use rustc_data_structures:: fx:: FxHashMap ;
9
9
use rustc_hir:: def:: DefKind ;
@@ -19,17 +19,17 @@ pub(super) type IdInterner = FxHashMap<FullItemId, types::Id>;
19
19
#[ derive( Debug , Clone , Copy , Hash , PartialEq , Eq ) ]
20
20
/// An uninterned id.
21
21
///
22
- /// One of these coresponds to every:
22
+ /// One of these corresponds to every:
23
23
/// 1. [`rustdoc_json_types::Item`].
24
- /// 2. [`rustdoc_json_types::Id`] transitivly (as each `Item` has an `Id`).
24
+ /// 2. [`rustdoc_json_types::Id`] transitively (as each `Item` has an `Id`).
25
25
///
26
26
/// It's *broadly* equivalent to a [`DefId`], but needs slightly more information
27
27
/// to fully disambiguate items, because sometimes we choose to split a single HIR
28
- /// item into multiple JSON items, or have items with no coresponding HIR item.
28
+ /// item into multiple JSON items, or have items with no corresponding HIR item.
29
29
pub ( super ) struct FullItemId {
30
30
/// The "main" id of the item.
31
31
///
32
- /// In most cases this unequely identifies the item, other fields are just
32
+ /// In most cases this uniquely identifies the item, the other fields are just
33
33
/// used for edge-cases.
34
34
def_id : DefId ,
35
35
@@ -39,7 +39,7 @@ pub(super) struct FullItemId {
39
39
/// 2. Blanket impls synthesized by rustdoc.
40
40
/// 3. Splitting of reexports of multiple items.
41
41
///
42
- /// Eg :
42
+ /// E.g :
43
43
///
44
44
/// ```rust
45
45
/// mod module {
@@ -54,10 +54,10 @@ pub(super) struct FullItemId {
54
54
/// we need to disambiguate.
55
55
extra_id : Option < DefId > ,
56
56
57
- /// Needed for `rustc_doc_primitive` modules.
57
+ /// Needed for `#[ rustc_doc_primitive] ` modules.
58
58
///
59
59
/// For these, 1 [`DefId`] is used for both the primitive and the fake-module
60
- /// that holds it's docs.
60
+ /// that holds its docs.
61
61
///
62
62
/// N.B. This only matters when documenting the standard library with
63
63
/// `--document-private-items`. Maybe we should delete that module, and
0 commit comments