rust/compiler/rustc_errors/src
Matthias Krüger 770c8d0667
Rollup merge of #113871 - clubby789:derive-sugg-span, r=compiler-errors
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
2023-07-20 07:08:43 +02:00
..
json On nightly, dump ICE backtraces to disk 2023-07-19 14:10:07 +00:00
markdown Re-format let-else per rustfmt update 2023-07-12 21:49:27 -04:00
annotate_snippet_emitter_writer.rs
diagnostic_builder.rs Remove adt_const_params usage from compiler 2023-06-01 18:21:42 +00:00
diagnostic_impls.rs Use translatable diagnostics in rustc_const_eval 2023-06-01 14:45:18 +00:00
diagnostic.rs Use translatable diagnostics in rustc_const_eval 2023-06-01 14:45:18 +00:00
emitter.rs Use the correct span for displaying the line following a derive suggestion 2023-07-19 23:48:43 +00:00
error.rs
json.rs
lib.rs On nightly, dump ICE backtraces to disk 2023-07-19 14:10:07 +00:00
lock.rs bump windows crate 0.46 -> 0.48 in workspace 2023-05-09 18:20:13 +03:00
registry.rs
snippet.rs
styled_buffer.rs
tests.rs correct literals for dyn thread safe 2023-05-06 09:34:53 +08:00
translation.rs