-
Notifications
You must be signed in to change notification settings - Fork 13.3k
UItest error annotations for errors in auxiliary crates are marked as superfluous #139262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Diagnostic JSON
|
I've done some more investigating, and after some consideration, I came back to think this current behavior is the right one. compiletest currently doesn't support ui error annotations on auxiliaries. I believe this is because diagnostics spans in general can point into arbitrary places e.g. dependencies or standard library sources where you obviously cannot add ui error annotations. So, in the case where the diag span points into external crates from the POV of the main test itself, I believe That annotation in auxiliary does nothing, you can confirm by adding a random Footnotes
|
I'm going to close this issue as intended, because I think it's important that we do check diagnostics (even those that do not have line info corresponding to main test file) exhaustively whereever feasible. |
After a discussion on the community discord with @jieyouxu
This pr has tests (in tests/ui/eii) that have errors in auxiliary crates. Until recently (before a rebase yesterday. I've not completely figured out when it stopped working) this was fine. In the aux crate there's also a marking (
//~ error ...
). However, after the rebase it complains that there's errors without a span being emitted while none were expected. This is in some sense true, errors are emitted with spans from a different crate.as an example:
the stderr of one of my tests:
and yet:
where the aux crate is annotated with:
in other words, this is an expected error.
The text was updated successfully, but these errors were encountered: