-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
E0094 needs better underline #35966
Comments
So we're looking at an |
Tried that, but getting
instead, which is closer, but still not quite. Going to look more at it tomorrow though. |
@kyrias - almost there, just need to also update the span at the start of the error message as well. When both are updated, it will will turn the new underline into the primary span (the ^^^ underline) |
Ah, didn't think about that span! (And I just realized it's almost 01:00.) To get there I have to match on Edit: I could of course set a variable with either the span from the generics or the |
You don't need to overthink this: let span = match it.node {
ForeignItem_::ForeignItemFn(_, ref generics) => generics.span().unwrap_or(it.span),
_ => it.span
}; And then use |
Essentially, |
Yeah, I'm not sure what I was thinking. That serves me right for doing things while going to bed is 3 hours overdue. Currently compiling, will submit a PR in a while when all tests are done. |
Currently, E0094 looks like:
A better span would underline the type parameters themselves.
The text was updated successfully, but these errors were encountered: