-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Backward spans are displayed strangely #42104
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
cc @estebank who touched this code recently. |
Oh, beautiful... I'm seeing many problems with this output, beyond the obvious. I feel the proper output should either be: warning: struct is never used: `S`
--> src/main.rs:8:10
|
3 | $b $a;
| ^^^^^^ unused struct
...
8 | m!(S struct);
| ------------- in this macro invocation
|
= note: #[warn(dead_code)] on by default or warning: struct is never used: `S`
--> src/main.rs:8:10
|
8 | m!(S struct);
| ---^^^^^^^^-- in this macro invocation
| |
| unused struct
= note: #[warn(dead_code)] on by default I can make (or mentor) a small patch to either swap end and start if they are reversed or only point at the last end for that case, but I'd prefer to properly fix the spans generated in macro invocations in a better way regardless. |
This made it into 1.18.0. |
Help wanted. @estebank can mentor. |
@brson should this be backported to 1.19? I don't feel there's a need to rush it. |
I'm going to suggest that we don't backport this; it's not high-impact enough. |
That's my thinking as well. |
This is a regression in 1.18.0-beta but unclear whether it affects anything in practice. We encountered this in #rust-libs discussing #40939.
The text was updated successfully, but these errors were encountered: