Enforce that query results implement Debug
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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>>>,
|
||||
|
||||
Reference in New Issue
Block a user