about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
diff options
context:
space:
mode:
authorxFrednet <xFrednet@gmail.com>2022-03-29 00:10:45 +0200
committerxFrednet <xFrednet@gmail.com>2022-05-08 14:37:14 +0200
commit2c5e85249f8b10b5fb0caf608d8b2537620285c6 (patch)
tree8d3d6e7b8e79d54df8b5eda69dbe45923b666a47 /compiler/rustc_query_impl/src
parent7f03681cd941c7e18ee99549148b8aa6f468d7c2 (diff)
downloadrust-2c5e85249f8b10b5fb0caf608d8b2537620285c6.tar.gz
rust-2c5e85249f8b10b5fb0caf608d8b2537620285c6.zip
Move lint expectation checking into a separate query (RFC 2383)
Diffstat (limited to 'compiler/rustc_query_impl/src')
-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> {