]> git.lizzy.rs Git - rust.git/commitdiff
Mark `extern_mod_stmt_cnum` as `eval_always`
authorAaron Hill <aa1ronham@gmail.com>
Mon, 15 Mar 2021 16:26:49 +0000 (12:26 -0400)
committerAaron Hill <aa1ronham@gmail.com>
Mon, 15 Mar 2021 16:26:49 +0000 (12:26 -0400)
This query reads from global untracked state, so it always needs to be
evaluated.

compiler/rustc_middle/src/query/mod.rs

index b03b26d64606cf83125138847a029b1daf6fb8b1..c5697ff1ce1cb182005b9ef42ead3ba499a6bf41 100644 (file)
         desc { |tcx| "collecting child items of `{}`", tcx.def_path_str(def_id) }
     }
     query extern_mod_stmt_cnum(def_id: LocalDefId) -> Option<CrateNum> {
+        // This depends on untracked global state (`tcx.extern_crate_map`)
+        eval_always
         desc { |tcx| "computing crate imported by `{}`", tcx.def_path_str(def_id.to_def_id()) }
     }