about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2022-02-16 13:04:48 -0500
committerMark Rousskov <mark.simulacrum@gmail.com>2022-02-16 17:24:23 -0500
commit976348603485b216b0d5314eca674a2b24df4c73 (patch)
tree4b18e40496faf663e6101f16272682fd67120be2 /compiler/rustc_query_impl/src
parent393fdc10483da930cdbb00eabc3635030d2e776f (diff)
Move ty::print methods to Drop-based scope guards
Diffstat (limited to 'compiler/rustc_query_impl/src')
-rw-r--r--compiler/rustc_query_impl/src/plumbing.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs
index ff9d32a6776..683d56d5d0f 100644
--- a/compiler/rustc_query_impl/src/plumbing.rs
+++ b/compiler/rustc_query_impl/src/plumbing.rs
@@ -272,11 +272,12 @@ macro_rules! define_queries {
                 let name = stringify!($name);
                 // Disable visible paths printing for performance reasons.
                 // Showing visible path instead of any path is not that important in production.
-                let description = ty::print::with_no_visible_paths(
-                    || ty::print::with_forced_impl_filename_line(
+                let description = ty::print::with_no_visible_paths!(
                     // Force filename-line mode to avoid invoking `type_of` query.
-                    || queries::$name::describe(tcx, key)
-                ));
+                    ty::print::with_forced_impl_filename_line!(
+                        queries::$name::describe(tcx, key)
+                    )
+                );
                 let description = if tcx.sess.verbose() {
                     format!("{} [{}]", description, name)
                 } else {