]> git.lizzy.rs Git - rust.git/commitdiff
Move ty::print methods to Drop-based scope guards
authorMark Rousskov <mark.simulacrum@gmail.com>
Wed, 16 Feb 2022 18:04:48 +0000 (13:04 -0500)
committerMark Rousskov <mark.simulacrum@gmail.com>
Wed, 16 Feb 2022 22:24:23 +0000 (17:24 -0500)
src/type_of.rs

index 281e49fa8a35ed4b6344c58688b792236b42fa3d..0ada20cad2c3be3c3931a58151832a6c0d79a75b 100644 (file)
@@ -52,7 +52,7 @@ pub fn uncached_gcc_type<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, layout: TyAndLa
         ty::Adt(..) | ty::Closure(..) | ty::Foreign(..) | ty::Generator(..) | ty::Str
             if !cx.sess().fewer_names() =>
         {
-            let mut name = with_no_trimmed_paths(|| layout.ty.to_string());
+            let mut name = with_no_trimmed_paths!(layout.ty.to_string());
             if let (&ty::Adt(def, _), &Variants::Single { index }) =
                 (layout.ty.kind(), &layout.variants)
             {