Skip to content
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

feat: remove the scalar type T from the Allocator trait #1397

Merged
merged 2 commits into from
Jun 12, 2024
Merged

feat: remove the scalar type T from the Allocator trait #1397

merged 2 commits into from
Jun 12, 2024

Conversation

sebcrozet
Copy link
Member

This is based on #1396. I thought GAT was only stabilized for lifetime parameters, but it looks like it also works for actual type parameters.

This doesn’t eliminate the need for explicit DefaultAllocator: Allocator bounds, bust it least simplifies it by not exposing implementation details about the scalar type.

I haven’t been very diligent at checking if we now have some duplicate bounds. For example if Allocator<N1, R, C> + Allocator<N2, R, C> got transformed to Allocator<R, C> + Allocator<R, C> so one of them can be removed.

@sebcrozet sebcrozet force-pushed the gat branch 4 times, most recently from 4217d64 to 91bd7a5 Compare May 20, 2024 14:41
To ease the transition, the previous T type parameter is replaced by a useless Dummy type parameter. This will be removed in the next commit.
@sebcrozet sebcrozet merged commit c23807a into dev Jun 12, 2024
11 checks passed
@Andlon Andlon mentioned this pull request Jun 21, 2024
@sebcrozet sebcrozet deleted the gat branch June 23, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant