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

Inline generics with default types works, as long as there are no trait bounds #216

Merged
merged 1 commit into from
Jan 30, 2024
Merged

Inline generics with default types works, as long as there are no trait bounds #216

merged 1 commit into from
Jan 30, 2024

Conversation

escritorio-gustavo
Copy link
Contributor

@escritorio-gustavo escritorio-gustavo commented Jan 30, 2024

I found that #[export] doesn't magically figure out a type for trait bounds as I thought was happening (I saw the tests with trait bounds use decl::<&'static str> and had no idea how that was happening) and instead always uses ()

This means that checking for "null" works with default types, and would work with bounds if we could implement foreign traits on (), which sadly we can't due to the orphan rule.

I opened a separate issue for this #214

@escritorio-gustavo escritorio-gustavo merged commit a0a3e13 into Aleph-Alpha:main Jan 30, 2024
2 checks passed
@escritorio-gustavo escritorio-gustavo deleted the inline_generics_default branch January 30, 2024 18:23
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.

None yet

1 participant