-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Merged by Bors] - Replace WorldQueryGats
trait with actual gats
#6319
Conversation
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.
Looks good! The WorldQuery
trait impls are way more legible.
Great use of deprecation. The actual changes are very mechanical; I'm glad to see you hit the doc strings too though.
This PR is blocked on the next release of Rust, which will stabilize basic GATs. |
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.
This is so much nicer. My only gripe is that ROQueryItem<'w, Q>
to <Q::ReadOnly as WorldQuery>::Item
is a readability regression.
I'd be fine just keeping |
It's in these cases I wish traits supported default type aliases. |
default type alias isnt really what we want since that would allow it to be overriden. What you'd want it something that behaves more like: trait GetReadOnlyItem {
type ReadOnlyItem<'w>;
type ReadOnlyFetch<'w>;
}
impl<T: WorldQuery> GetReadOnlyItem for T {
type ReadOnlyItem<'w> = <T::ReadOnly as WorldQuery>::Item<'w>;
type ReadOnlyItem<'w> = <T::ReadOnly as WorldQuery>::Fetch<'w>;
} |
Actually thats tiny enough of a change that im just Gonna Do That instead of |
Wow that incredibly did not work and I have no idea why, guess I'm not doing that lol |
ff44f19
to
32d4125
Compare
decided against removing |
4239f26
to
6f6746c
Compare
6f6746c
to
687800e
Compare
looked over the changes after rebasing and they still seem correct to me |
687800e
to
47381fc
Compare
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.
Rebase LGTM.
bors r+ |
# Objective Replace `WorldQueryGats` trait with actual gats ## Solution Replace `WorldQueryGats` trait with actual gats --- ## Changelog - Replaced `WorldQueryGats` trait with actual gats ## Migration Guide - Replace usage of `WorldQueryGats` assoc types with the actual gats on `WorldQuery` trait
WorldQueryGats
trait with actual gatsWorldQueryGats
trait with actual gats
# Objective Replace `WorldQueryGats` trait with actual gats ## Solution Replace `WorldQueryGats` trait with actual gats --- ## Changelog - Replaced `WorldQueryGats` trait with actual gats ## Migration Guide - Replace usage of `WorldQueryGats` assoc types with the actual gats on `WorldQuery` trait
Objective
Replace
WorldQueryGats
trait with actual gatsSolution
Replace
WorldQueryGats
trait with actual gatsChangelog
WorldQueryGats
trait with actual gatsMigration Guide
WorldQueryGats
assoc types with the actual gats onWorldQuery
trait