-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
aliases cannot be used for traits note is printed wrongly
#31686
Comments
EDIT: err, I’ll just fill another issue (#31687). |
The note should use fileline_note instead, and we should have an extra note in case the type alias has a span (which will not be the case if it's from a foreign mod) |
Mentoring this. Relevant code You will also need to use Let me know if you have any questions! |
@Manishearth while I do not disagree with general suggestion to use #31687 (comment) has a code sample which reproduces the issue, by the way. |
As I see it there are two distinct issues. One is that there should be better diagnostics pointing to the typedef. That's what this bug is about. The other is that sometimes it errors for struct types instead (I find this unlikely?). Could you provide an example which reproduces this? The one you link to doesn't. http://is.gd/VKbcPH |
Oh, it doesn’t fail on nightly. I guess, then, original issue I reported is not really an issue anymore. |
Ongoing work at #32005 |
Fix note for type alias in trait position Fixes #31686
The error here is pretty clear, but the note is completely wrong as the relevant snippet appears in the type of the struct field and not
type
item.The text was updated successfully, but these errors were encountered: