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

add support for const generics #56

Merged
merged 3 commits into from
Dec 26, 2019
Merged

add support for const generics #56

merged 3 commits into from
Dec 26, 2019

Conversation

Freax13
Copy link
Contributor

@Freax13 Freax13 commented Dec 16, 2019

async-trait currently doesnt work with const generics. this pull request tries to fix this

closes #57

Copy link
Owner

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks -- could you add a test? You can put it behind the existing async_trait_nightly_testing cfg in the tests directory.

@dtolnay
Copy link
Owner

dtolnay commented Dec 25, 2019

The test that you added compiles successfully even without your change to the macro. Is there a way to add a better test?

@Freax13
Copy link
Contributor Author

Freax13 commented Dec 26, 2019

turns out the compiler seems to be infering the const generic unless you add something else eg another type generic

Copy link
Owner

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dtolnay dtolnay merged commit 1ac40d4 into dtolnay:master Dec 26, 2019
@dtolnay
Copy link
Owner

dtolnay commented Dec 26, 2019

Published in 0.1.22.

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.

Support trait methods with const generic parameters
2 participants