770c8d0667
Use the correct span for displaying the line following a derive sugge… `span` here is the main span of the diagnostic. In the linked issue's case, this belongs to `main.rs`. However, the line numbers (and line we are trying to display) are in `name.rs`, so using `span_to_lines` gives us the wrong `FileLines`. Use `parts[0].span` (the span of the suggestion) here like the rest of the code does to get the right file. Not sure if this needs a dedicated test because this fixes an existing error in the UI suite Fixes #113844 |
||
---|---|---|
.. | ||
json | ||
markdown | ||
annotate_snippet_emitter_writer.rs | ||
diagnostic_builder.rs | ||
diagnostic_impls.rs | ||
diagnostic.rs | ||
emitter.rs | ||
error.rs | ||
json.rs | ||
lib.rs | ||
lock.rs | ||
registry.rs | ||
snippet.rs | ||
styled_buffer.rs | ||
tests.rs | ||
translation.rs |