Closed
Description
span_note
and friends require this non-obvious pattern to work correctly:
if span.is_dummy() {
err.note(msg);
} else {
err.span_note(span, msg);
}
If dummy span is passed to span_note
then the message simply won't be displayed, but with note
it will be attached to the primary err
message.
The difference is that note
turns into an empty multi-span, but span_note
turns into multi-span containing a single dummy span.
I think span_note
should "just work" with dummy spans and display the message equivalently to note
.