Enforce that query results implement Debug

This commit is contained in:
Aaron Hill
2021-01-03 09:19:16 -05:00
parent 492b83c697
commit 7afb32557d
22 changed files with 45 additions and 33 deletions

View File

@@ -86,11 +86,13 @@ fn is_body_owner<'hir>(node: Node<'hir>, hir_id: HirId) -> bool {
}
}
#[derive(Debug)]
pub(super) struct HirOwnerData<'hir> {
pub(super) signature: Option<&'hir Owner<'hir>>,
pub(super) with_bodies: Option<&'hir mut OwnerNodes<'hir>>,
}
#[derive(Debug)]
pub struct IndexedHir<'hir> {
/// The SVH of the local crate.
pub crate_hash: Svh,

View File

@@ -16,6 +16,7 @@ use rustc_hir::def_id::{LocalDefId, LOCAL_CRATE};
use rustc_hir::*;
use rustc_index::vec::IndexVec;
#[derive(Debug)]
pub struct Owner<'tcx> {
parent: HirId,
node: Node<'tcx>,
@@ -31,12 +32,13 @@ impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for Owner<'tcx> {
}
}
#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct ParentedNode<'tcx> {
parent: ItemLocalId,
node: Node<'tcx>,
}
#[derive(Debug)]
pub struct OwnerNodes<'tcx> {
hash: Fingerprint,
nodes: IndexVec<ItemLocalId, Option<ParentedNode<'tcx>>>,