-
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
Add fix to error msg which relied on order #75444
Conversation
cd8c288
to
6524c71
Compare
Currently this removes some errors emitted when there are fewer type arguments than parameters. |
The code itself is quite nasty, but is this generally what we want to do? I can remove extra span messages which are semi redundant fairly easily. If this is what we want to do, I'll try to clean up the code more |
This comment has been minimized.
This comment has been minimized.
8914dee
to
7672e43
Compare
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | | | ||
| | expected type, found lifetime | ||
| expected at most 1 type argument |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect us to put types before constants here, so rn you recommend Example<'a, const, type>
but Example<'a, type, const>
would be better imo.
The "expected at most 1 type argument" also seems slightly incorrect here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah wait, I'm a bit confused, since the struct has the order <'a, type, const>
, shouldn't it just stick to that order
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
e5cd410
to
df0d0c7
Compare
This comment has been minimized.
This comment has been minimized.
31c8a3f
to
14ab09a
Compare
☔ The latest upstream changes (presumably #78127) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
@JulianKnodt can you rebless the tests (which should fix the conflicts) while wait for @lcnr to review? thanks |
Ah I think part of it was if it was unsure if we wanted to follow this path, but I'll update it. |
Previously types needed to be ordered before consts. Since relaxing that restriction, this created a bug wherever relying on that. This produces a strange error message, so it's not awful but should still be fixed. Add ParamKindOrd instead of &str Switches from using strings to ParamKindOrd, as dealing with enums provides better guarantees to not miss things. Add test Add new loop for checking types/consts Update to check const & type in 1 loop
14ab09a
to
09bfb30
Compare
☔ The latest upstream changes (presumably #79104) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
I believe this was implemented for the most part in #79032, so I'll close this |
Previously types needed to be ordered before consts. Since relaxing that restriction, this
created a bug wherever relying on that. This produces a strange error message, so it's not awful
but should still be fixed.
I rushed a bit to make this PR, but I'll look more closely if there's better ways to write tmrw morning.
r? @lcnr