Skip to content

Commit 1e2dbb5

Browse files
committed
Document structs.
1 parent 394f719 commit 1e2dbb5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler/rustc_hir/src/hir.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ pub struct ParentedNode<'tcx> {
672672
pub node: Node<'tcx>,
673673
}
674674

675-
/// Attributes owner by a HIR owner.
675+
/// Attributes owned by a HIR owner.
676676
#[derive(Debug)]
677677
pub struct AttributeMap<'tcx> {
678678
pub map: BTreeMap<ItemLocalId, &'tcx [Attribute]>,
@@ -689,6 +689,9 @@ impl<'tcx> AttributeMap<'tcx> {
689689
}
690690
}
691691

692+
/// Map of all HIR nodes inside the current owner.
693+
/// These nodes are mapped by `ItemLocalId` alongside the index of their parent node.
694+
/// The HIR tree, including bodies, is pre-hashed.
692695
#[derive(Debug)]
693696
pub struct OwnerNodes<'tcx> {
694697
/// Pre-computed hash of the full HIR.
@@ -704,6 +707,7 @@ pub struct OwnerNodes<'tcx> {
704707
pub bodies: IndexVec<ItemLocalId, Option<&'tcx Body<'tcx>>>,
705708
}
706709

710+
/// Full information resulting from lowering an AST node.
707711
#[derive(Debug, HashStable_Generic)]
708712
pub struct OwnerInfo<'hir> {
709713
/// Contents of the HIR.

0 commit comments

Comments
 (0)