From 85a14d70bb2f094f67642ed22f5ffab4a4b9b719 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Tue, 11 May 2021 11:26:52 +0200 Subject: Use () in dependency_formats. --- compiler/rustc_query_impl/src/keys.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'compiler/rustc_query_impl') diff --git a/compiler/rustc_query_impl/src/keys.rs b/compiler/rustc_query_impl/src/keys.rs index 1fdb37398f9..27a0dc47682 100644 --- a/compiler/rustc_query_impl/src/keys.rs +++ b/compiler/rustc_query_impl/src/keys.rs @@ -21,6 +21,16 @@ pub trait Key { fn default_span(&self, tcx: TyCtxt<'_>) -> Span; } +impl Key for () { + fn query_crate(&self) -> CrateNum { + LOCAL_CRATE + } + + fn default_span(&self, _: TyCtxt<'_>) -> Span { + DUMMY_SP + } +} + impl<'tcx> Key for ty::InstanceDef<'tcx> { fn query_crate(&self) -> CrateNum { LOCAL_CRATE -- cgit 1.4.1-3-g733a5