-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Incorrect generic parameter ordering for E0747 #72815
Comments
I want to try working on this. @rustbot claim |
I've been trying to fix this, but even reversing the arguments to the I also added err.note(&format!("{} arguments must be provided before {} arguments ABC", arg.descr(), kind)); And here's the error diff:
EDIT: I modified the expected stderr for the test so that it matches how it should look after this is fixed by the way. |
I've looked into it a bit more, and it looks like this isn't as simple as I thought at first. I thought it might work if I just reversed the arguments to I think I'll need to rethink this. |
Note that I cherry-picked the examples that were incorrect. The diagnostic is correct in other cases. You'll need to investigate a little to work out how best to fix this; one simple solution would be to sort the two with |
Okay, thanks for the info! I'll look into sorting and see if that works :) |
I think I've figured out a basic solution. Let me know if there are things I can improve! |
https://github.com/rust-lang/rust/blob/a59264b01247836c70e24217e0d346b868387525/src/test/ui/suggestions/suggest-move-types.stderr#L121-L135
suggests type parameters should come before lifetime parameters, which is incorrect.
The message is emitted here:
https://github.com/rust-lang/rust/blob/a59264b01247836c70e24217e0d346b868387525/src/librustc_typeck/astconv.rs#L463-L477
This issue has been assigned to @camelid via this comment.
The text was updated successfully, but these errors were encountered: