Move ty::print methods to Drop-based scope guards
This commit is contained in:
parent
40d30ceb43
commit
e855e2d15c
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user