diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-07-20 07:08:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-20 07:08:43 +0200 |
| commit | 770c8d06672ea8d317df7bdf5ff5f8ce954ecbdd (patch) | |
| tree | 718bce56573cbb50af071101db19daf13ce003a3 /compiler/rustc_codegen_ssa/src/errors.rs | |
| parent | 53580da72d55942374b9210ff20f1912260efa26 (diff) | |
| parent | 20a3b9a2152ff705af029cbb359bc09a4b43a9c7 (diff) | |
| download | rust-770c8d06672ea8d317df7bdf5ff5f8ce954ecbdd.tar.gz rust-770c8d06672ea8d317df7bdf5ff5f8ce954ecbdd.zip | |
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
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
