Render a one-line diagnostic snippet with a caret marker under the range. The returned string does not end in a newline.
Example output:
3 | foo = bar baz | ^^^ Copy
3 | foo = bar baz | ^^^
Ranges spanning multiple lines are truncated to the first line; the caret extends to the end of that line.
Render a one-line diagnostic snippet with a caret marker under the range. The returned string does not end in a newline.
Example output:
Ranges spanning multiple lines are truncated to the first line; the caret extends to the end of that line.