about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorGuillaume Boisseau <Nadrieril@users.noreply.github.com>2024-02-17 11:23:04 +0100
committerGitHub <noreply@github.com>2024-02-17 11:23:04 +0100
commitc7701ba803534a5f70ab9f98d72b08b0a233ac4a (patch)
treeb702a0936ce279c3ef5515fb8587f95f4a17674e /compiler/rustc_codegen_llvm/src/errors.rs
parent5ff90223065405c5c9ed154abaf01750e8f87591 (diff)
parentcd9021e8cb1ab6cf5bdf341d7e0538703d86fc5b (diff)
downloadrust-c7701ba803534a5f70ab9f98d72b08b0a233ac4a.tar.gz
rust-c7701ba803534a5f70ab9f98d72b08b0a233ac4a.zip
Rollup merge of #121135 - Zalathar:no-whole-body-span, r=wesleywiser
coverage: Discard spans that fill the entire function body

While debugging some other coverage changes, I discovered a frustrating inconsistency that occurs in functions containing closures, if they end with an implicit `()` return instead of an explicit trailing-expression.

This turns out to have been caused by the corresponding node in MIR having a span that covers the entire function body. When preparing coverage spans, any span that fills the whole body tends to cause more harm than good, so this PR detects and discards those spans.

(This isn't the first time whole-body spans have caused problems; we also eliminated some of them in #118525.)
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions