Turn debugger_visualizers from feed- into regular query.
This commit is contained in:
parent
7f01893900
commit
a7d48800f9
6 changed files with 29 additions and 13 deletions
|
@ -1165,6 +1165,11 @@ pub(super) fn crate_hash(tcx: TyCtxt<'_>, _: LocalCrate) -> Svh {
|
|||
|
||||
source_file_names.sort_unstable();
|
||||
|
||||
// We have to take care of debugger visualizers explicitly. The HIR (and
|
||||
// thus `hir_body_hash`) contains the #[debugger_visualizer] attributes but
|
||||
// these attributes only store the file path to the visualizer file, not
|
||||
// their content. Yet that content is exported into crate metadata, so any
|
||||
// changes to it need to be reflected in the crate hash.
|
||||
let debugger_visualizers: Vec<_> = tcx
|
||||
.debugger_visualizers(LOCAL_CRATE)
|
||||
.iter()
|
||||
|
|
|
@ -1790,13 +1790,18 @@ rustc_queries! {
|
|||
desc { "looking at the source for a crate" }
|
||||
separate_provide_extern
|
||||
}
|
||||
|
||||
/// Returns the debugger visualizers defined for this crate.
|
||||
/// NOTE: This query has to be marked `eval_always` because it reads data
|
||||
/// directly from disk that is not tracked anywhere else. I.e. it
|
||||
/// represents a genuine input to the query system.
|
||||
query debugger_visualizers(_: CrateNum) -> &'tcx Vec<rustc_span::DebuggerVisualizerFile> {
|
||||
arena_cache
|
||||
desc { "looking up the debugger visualizers for this crate" }
|
||||
separate_provide_extern
|
||||
feedable
|
||||
eval_always
|
||||
}
|
||||
|
||||
query postorder_cnums(_: ()) -> &'tcx [CrateNum] {
|
||||
eval_always
|
||||
desc { "generating a postorder list of CrateNums" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue