-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Type errors in macros have poor spans #38771
Comments
Is anyone working on it? |
On nightly using
and once #46605 lands it'll look like this:
|
We should probably leave this ticket open for us to stabilize This reminds me, |
I think the "only" work left to do here is to add a way to annotate macro inner spans as coming from a macro argument. This annotation has to be very viral in order to work in this case. Looking at the current output for
the following spans should have the following
Once we have a way to travel back to an individual argument, we could see that the error comes from 8, which is tied all the way to 2, which corresponds to the second match argument in the macro call and emit the following without the backtrace:
or
|
For example, in this code, it's hard to tell which part of the inputs to the macro has the wrong type. This is obviously a reduced example, but I've seen the same problem in real code.
I suspect this might be a duplicate issue, but couldn't find anything...
provides:
The text was updated successfully, but these errors were encountered: