diff options
| author | bors <bors@rust-lang.org> | 2022-02-20 18:12:59 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-02-20 18:12:59 +0000 |
| commit | 523a1b1d388bfe82a5d0540b876d9428b6dccc9c (patch) | |
| tree | 0df7073fb1bcab18729dd7194ec8e4b5d1176531 /compiler/rustc_codegen_llvm/src | |
| parent | c1aa85475cf5623caf50f7ef3b62903bb084e518 (diff) | |
| parent | 976348603485b216b0d5314eca674a2b24df4c73 (diff) | |
| download | rust-523a1b1d388bfe82a5d0540b876d9428b6dccc9c.tar.gz rust-523a1b1d388bfe82a5d0540b876d9428b6dccc9c.zip | |
Auto merge of #94062 - Mark-Simulacrum:drop-print-cfg, r=oli-obk
Move ty::print methods to Drop-based scope guards Primary goal is reducing codegen of the TLS access for each closure, which shaves ~3 seconds of bootstrap time over rustc as a whole.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/type_of.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/type_of.rs b/compiler/rustc_codegen_llvm/src/type_of.rs index dc2df8849f8..02a263637a6 100644 --- a/compiler/rustc_codegen_llvm/src/type_of.rs +++ b/compiler/rustc_codegen_llvm/src/type_of.rs @@ -43,8 +43,7 @@ fn uncached_llvm_type<'a, 'tcx>( // in problematically distinct types due to HRTB and subtyping (see #47638). // ty::Dynamic(..) | ty::Adt(..) | ty::Closure(..) | ty::Foreign(..) | ty::Generator(..) | ty::Str => { - let mut name = - with_no_visible_paths(|| with_no_trimmed_paths(|| layout.ty.to_string())); + let mut name = with_no_visible_paths!(with_no_trimmed_paths!(layout.ty.to_string())); if let (&ty::Adt(def, _), &Variants::Single { index }) = (layout.ty.kind(), &layout.variants) { |
