diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2022-02-16 13:04:48 -0500 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2022-02-16 17:24:23 -0500 |
| commit | 976348603485b216b0d5314eca674a2b24df4c73 (patch) | |
| tree | 4b18e40496faf663e6101f16272682fd67120be2 /compiler/rustc_macros/src | |
| parent | 393fdc10483da930cdbb00eabc3635030d2e776f (diff) | |
Move ty::print methods to Drop-based scope guards
Diffstat (limited to 'compiler/rustc_macros/src')
| -rw-r--r-- | compiler/rustc_macros/src/query.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_macros/src/query.rs b/compiler/rustc_macros/src/query.rs index 478159147ac..a6912653368 100644 --- a/compiler/rustc_macros/src/query.rs +++ b/compiler/rustc_macros/src/query.rs @@ -434,7 +434,9 @@ fn add_query_description_impl( #[allow(unused_variables)] fn describe(tcx: QueryCtxt<$tcx>, key: Self::Key) -> String { let (#tcx, #key) = (*tcx, key); - ::rustc_middle::ty::print::with_no_trimmed_paths(|| format!(#desc).into()) + ::rustc_middle::ty::print::with_no_trimmed_paths!( + format!(#desc) + ) } }; |
