Improve coverage spans for chained function calls by richkadel · Pull Request #84529 · rust-lang/rust (original) (raw)
Fixes: #84180
For chained function calls separated by the ?
try operator, the
function call following the try operator produced a MIR Call
span that
matched the span of the first call. The ?
try operator started a new
span, so the second call got no span.
It turns out the MIR Call
terminator has a func
Operand
for the Constant
representing the function name, and the function
name's Span can be used to reset the starting position of the span.
r? @tmandry
cc: @wesleywiser