diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-05-11 11:26:52 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-05-12 13:58:41 +0200 |
| commit | 85a14d70bb2f094f67642ed22f5ffab4a4b9b719 (patch) | |
| tree | be18ac3ba41867d812c6dc68f96630ee9fdeb850 /compiler/rustc_query_impl | |
| parent | ac923d94f86a6f7c881ecbedcd0a68d7986a35bd (diff) | |
| download | rust-85a14d70bb2f094f67642ed22f5ffab4a4b9b719.tar.gz rust-85a14d70bb2f094f67642ed22f5ffab4a4b9b719.zip | |
Use () in dependency_formats.
Diffstat (limited to 'compiler/rustc_query_impl')
| -rw-r--r-- | compiler/rustc_query_impl/src/keys.rs | 10 |
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 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 |
