Part of #59346
It would be nice to have a UI test for the annotate-snippet emitter, that includes annotations that span multiple files. The goal of this issue is to find and add such a test.
Instructions
A simple way to look for this, would be to add this code:
if annotated_files.len() > 1 {
let filename = primary_lo.file.name.to_string();
eprintln!("annotated_files > 1 in {}", filename);
}
to the top of fn slices_for_files and then check the failing UI tests.
If there are failing UI tests, it means that those UI tests include a diagnostic that probably spans multiple files.
The next step, is to copy that file (and possible auxiliary files) over into src/test/ui/annotate-snippet/ and add // compile-flags: --error-format human-annotate-rs to the top of the UI test.
Once that's done, be sure to run the added test and open a PR including the blessed stderr files.
Part of #59346
It would be nice to have a UI test for the annotate-snippet emitter, that includes annotations that span multiple files. The goal of this issue is to find and add such a test.
Instructions
A simple way to look for this, would be to add this code:
to the top of
fn slices_for_filesand then check the failing UI tests.If there are failing UI tests, it means that those UI tests include a diagnostic that probably spans multiple files.
The next step, is to copy that file (and possible auxiliary files) over into
src/test/ui/annotate-snippet/and add// compile-flags: --error-format human-annotate-rsto the top of the UI test.Once that's done, be sure to run the added test and open a PR including the blessed stderr files.