Closed
Description
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.
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsCategory: An issue proposing an enhancement or a PR with one.Call for participation: Help is requested to fix this issue.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the compiler team, which will review and decide on the PR/issue.