about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2023-03-26 11:00:26 +0200
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2023-04-06 08:25:53 +0200
commit36b4199a8e4197420760438df464cffcaa674e6c (patch)
tree043e301eb539cdfd187063b0b725059407d557a8 /compiler/rustc_query_impl/src
parent785459d630a129c4007e865b3c907cd5c469d604 (diff)
downloadrust-36b4199a8e4197420760438df464cffcaa674e6c.tar.gz
rust-36b4199a8e4197420760438df464cffcaa674e6c.zip
Don't rely on `Debug` impl for `Erased`
Diffstat (limited to 'compiler/rustc_query_impl/src')
-rw-r--r--compiler/rustc_query_impl/src/plumbing.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs
index ddc86b5173f..a1dfb27c5d7 100644
--- a/compiler/rustc_query_impl/src/plumbing.rs
+++ b/compiler/rustc_query_impl/src/plumbing.rs
@@ -487,6 +487,11 @@ macro_rules! define_queries {
             }
 
             #[inline]
+            fn format_value(self) -> fn(&Self::Value) -> String {
+                |value| format!("{:?}", restore::<query_values::$name<'tcx>>(*value))
+            }
+
+            #[inline]
             fn cache_on_disk(self, tcx: TyCtxt<'tcx>, key: &Self::Key) -> bool {
                 ::rustc_middle::query::cached::$name(tcx, key)
             }
@@ -819,7 +824,7 @@ macro_rules! define_queries_struct {
 
             $($(#[$attr])*
             #[inline(always)]
-            #[tracing::instrument(level = "trace", skip(self, tcx), ret)]
+            #[tracing::instrument(level = "trace", skip(self, tcx))]
             fn $name(
                 &'tcx self,
                 tcx: TyCtxt<'tcx>,