]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_middle/query/mod.rs
Use `LocalDefId` in `unsafety_check_result` query
[rust.git] / src / librustc_middle / query / mod.rs
index be9811a9c1283cef56ef2864086183af3281b669..fdefb8eee2e29c92ca8ffc876a569fbb72daa15b 100644 (file)
@@ -389,9 +389,9 @@ fn describe_as_module(def_id: DefId, tcx: TyCtxt<'_>) -> String {
 
     TypeChecking {
         /// The result of unsafety-checking this `DefId`.
-        query unsafety_check_result(key: DefId) -> mir::UnsafetyCheckResult {
-            desc { |tcx| "unsafety-checking `{}`", tcx.def_path_str(key) }
-            cache_on_disk_if { key.is_local() }
+        query unsafety_check_result(key: LocalDefId) -> mir::UnsafetyCheckResult {
+            desc { |tcx| "unsafety-checking `{}`", tcx.def_path_str(key.to_def_id()) }
+            cache_on_disk_if { true }
         }
 
         /// HACK: when evaluated, this reports a "unsafe derive on repr(packed)" error