-
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
require gat substs to be invariant #80558
Conversation
This comment has been minimized.
This comment has been minimized.
// When dealing with generic associated types we require | ||
// their generic arguments to be invariant. | ||
let gat_substs = &data.substs[trait_ref.substs.len()..]; | ||
self.add_constraints_from_invariant_substs(current, gat_substs, variance); |
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 that calling add_constraints_from_invariant_substs
directly on all of the substs makes more sense 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.
think so too, should have spend some time actually looking at add_constraints_for_trait_ref
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.
done
@bors r+ |
📌 Commit 5d641b649b1b0f5b4595914a63de111b996794be has been approved by |
removed some unnecessary changes |
@bors r+ |
📌 Commit f32a6ac has been approved by |
☀️ Test successful - checks-actions |
fixes #69184, fixes #80766
r? @matthewjasper probably