about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src/keys.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_query_impl/src/keys.rs')
-rw-r--r--compiler/rustc_query_impl/src/keys.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/rustc_query_impl/src/keys.rs b/compiler/rustc_query_impl/src/keys.rs
index 3f0f856b5dd..6fbafeb1d32 100644
--- a/compiler/rustc_query_impl/src/keys.rs
+++ b/compiler/rustc_query_impl/src/keys.rs
@@ -435,6 +435,16 @@ impl Key for Symbol {
     }
 }
 
+impl Key for Option<Symbol> {
+    #[inline(always)]
+    fn query_crate_is_local(&self) -> bool {
+        true
+    }
+    fn default_span(&self, _tcx: TyCtxt<'_>) -> Span {
+        DUMMY_SP
+    }
+}
+
 /// Canonical query goals correspond to abstract trait operations that
 /// are not tied to any crate in particular.
 impl<'tcx, T> Key for Canonical<'tcx, T> {