diff options
| author | bors <bors@rust-lang.org> | 2023-02-16 19:21:02 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-02-16 19:21:02 +0000 |
| commit | 9a7cc6c32f1a690f86827e4724bcda85e506ef35 (patch) | |
| tree | 97da19845e89b50ae3476d641883686852d8edc3 /compiler/rustc_codegen_llvm/src/context.rs | |
| parent | c5d1b3ea9665e77e3af2f17b311bf65469eedc19 (diff) | |
| parent | eb9f9c70854e981641080ec026697f71f354d47c (diff) | |
| download | rust-9a7cc6c32f1a690f86827e4724bcda85e506ef35.tar.gz rust-9a7cc6c32f1a690f86827e4724bcda85e506ef35.zip | |
Auto merge of #108127 - matthiaskrgr:rollup-kpzfc6j, r=matthiaskrgr
Rollup of 7 pull requests
Successful merges:
- #106347 (More accurate spans for arg removal suggestion)
- #108057 (Prevent some attributes from being merged with others on reexports)
- #108090 (`if $c:expr { Some($r:expr) } else { None }` =>> `$c.then(|| $r)`)
- #108092 (note issue for feature(packed_bundled_libs))
- #108099 (use chars instead of strings where applicable)
- #108115 (Do not ICE on unmet trait alias bounds)
- #108125 (Add new people to the compiletest review rotation)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/context.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/context.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs index 120dc59dfb3..8848ea3bb9a 100644 --- a/compiler/rustc_codegen_llvm/src/context.rs +++ b/compiler/rustc_codegen_llvm/src/context.rs @@ -402,12 +402,8 @@ impl<'ll, 'tcx> CodegenCx<'ll, 'tcx> { let (llcx, llmod) = (&*llvm_module.llcx, llvm_module.llmod()); - let coverage_cx = if tcx.sess.instrument_coverage() { - let covctx = coverageinfo::CrateCoverageContext::new(); - Some(covctx) - } else { - None - }; + let coverage_cx = + tcx.sess.instrument_coverage().then(coverageinfo::CrateCoverageContext::new); let dbg_cx = if tcx.sess.opts.debuginfo != DebugInfo::None { let dctx = debuginfo::CodegenUnitDebugContext::new(llmod); |
