Skip to content

Allow unsized generic arguments in IsProviderFor trait#114

Merged
soareschen merged 1 commit intomainfrom
unsized-is-provider-generics
Jun 21, 2025
Merged

Allow unsized generic arguments in IsProviderFor trait#114
soareschen merged 1 commit intomainfrom
unsized-is-provider-generics

Conversation

@soareschen
Copy link
Collaborator

@soareschen soareschen commented Jun 21, 2025

Summary

The generic parameters in traits all have the Sized constraint by default. This causes issues with the IsProviderFor trait, which by default requires Params to be Sized. This makes it not possible to define CGP components with traits that contains generic parameters that are ?Sized.

This PR fixes the issue by allowing Params: ?Sized inside IsProviderFor and CanUseComponent.

This issue is uncovered thanks to the report at #113.

@soareschen soareschen merged commit 6c350a0 into main Jun 21, 2025
5 checks passed
@soareschen soareschen deleted the unsized-is-provider-generics branch June 21, 2025 19:16
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