Function rustc_query_impl::make_query::hir_crate[][src]

pub fn hir_crate<'tcx>(
    tcx: QueryCtxt<'tcx>,
    key: hir_crate<'tcx>
) -> QueryStackFrame
Expand description

Represents crate as a whole (as distinct from the top-level crate module). If you call hir_crate (e.g., indirectly by calling tcx.hir().krate()), we will have to assume that any change means that you need to be recompiled. This is because the hir_crate query gives you access to all other items. To avoid this fate, do not call tcx.hir().krate(); instead, prefer wrappers like tcx.visit_all_items_in_krate().