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

Implement KnownLayout for all T: Sized #1920

Open
joshlf opened this issue Oct 16, 2024 · 0 comments
Open

Implement KnownLayout for all T: Sized #1920

joshlf opened this issue Oct 16, 2024 · 0 comments

Comments

@joshlf
Copy link
Member

joshlf commented Oct 16, 2024

This is currently impossible because it causes impl conflicts with any generic #[derive(KnownLayout)]. However, if we could get Rust to understand that we're only emitting a derive for unsized types, it'd be possible. Prototyped in 5601ac4, but Rust doesn't know that TrailingField: KnownLayout<PointerMetadata = usize> implies TrailingField: !Sized. Maybe we can spell TrailingField: !Sized somehow?

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

No branches or pull requests

1 participant