-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Refactor compare_impl_method to use all bounds #20290
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
Conversation
4dfaccf
to
5a2568b
Compare
); | ||
|
||
// Construct trait parameter environment and then shift it into the skolemized viewpoint. | ||
let mut trait_param_env = |
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 think you probably want impl_env
cloned and using hybrid_preds
, rather than starting with the trait environment. Not that it really matters. But nonetheless, it seems more correct: we've brought everything into the impl namespace, so those are the type parameters etc that are in scope.
098990d
to
03d7e42
Compare
We should definitely get the spans cleaned up before we land this. I can help you with that. |
45a8708
to
574d824
Compare
This is waiting on #20789 and a rebase before it is ready to merged. |
b175240
to
fe65af0
Compare
Refactor compare_impl_method into its own file. Modify the code to stop comparing individual parameter bounds. Instead we now use the predicates list attached to the trait and implementation generics. This ensures consistency even when bounds are declared in different places (i.e on a parameter vs. in a where clause).
fe65af0
to
6a66b32
Compare
…sakis This should fix both #20020 and #20107. This moves out the code into its own file. I have a couple concerns that can either be addressed in this PR or in a future one. - The error reporting for the fulfillment context should be span aware because currently it is attached to the top of the file which is less then desirable. - There is a failure in the test file: run-pass/issue-2611-3.rs, this seems like it should be a failure to me, but I am not sure. As a nit I'm not enthused about the file name, and am open to better suggestions. r? @nikomatsakis
This should fix both #20020 and #20107. This moves out the code into its own file.
I have a couple concerns that can either be addressed in this PR or in a future one.
of the file which is less then desirable.
As a nit I'm not enthused about the file name, and am open to better suggestions.
r? @nikomatsakis