about summary refs log tree commit diff
path: root/compiler/rustc_mir_build
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_mir_build
parent393fdc10483da930cdbb00eabc3635030d2e776f (diff)
downloadrust-976348603485b216b0d5314eca674a2b24df4c73.tar.gz
rust-976348603485b216b0d5314eca674a2b24df4c73.zip
Move ty::print methods to Drop-based scope guards
Diffstat (limited to 'compiler/rustc_mir_build')
-rw-r--r--compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs b/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs
index 7db71ed598d..b83cbb753df 100644
--- a/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs
+++ b/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs
@@ -121,7 +121,7 @@ impl<'a, 'tcx> ConstToPat<'a, 'tcx> {
 
     fn search_for_structural_match_violation(&self, ty: Ty<'tcx>) -> Option<String> {
         traits::search_for_structural_match_violation(self.span, self.tcx(), ty).map(|non_sm_ty| {
-            with_no_trimmed_paths(|| match non_sm_ty {
+            with_no_trimmed_paths!(match non_sm_ty {
                 traits::NonStructuralMatchTy::Adt(adt) => self.adt_derive_msg(adt),
                 traits::NonStructuralMatchTy::Dynamic => {
                     "trait objects cannot be used in patterns".to_string()