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

wasmtime-component-macro: struct and consts created for flags! must be pub #5030

Merged
merged 2 commits into from
Oct 7, 2022

Conversation

pchickey
Copy link
Contributor

@pchickey pchickey commented Oct 7, 2022

Previously this created a private type, and private consts.

I also added fn all() -> Self and fn empty() -> Self constructors, because those are the two "most popular" functions from bitflags I stole for the sake of some tests. empty ends up being the same as Default, and all is .empty().not(), so these don't require any actual code generation.

Future work might consider adding the rest of the bitflags methods & impls, and putting the docs through the macro into rustdocs.

@pchickey pchickey force-pushed the pch/component_flags_pub branch from d35ce63 to dab3789 Compare October 7, 2022 00:33
@pchickey pchickey changed the title wasmtime-component-macro: struct created for flags! must be pub wasmtime-component-macro: struct and consts created for flags! must be pub Oct 7, 2022
@pchickey pchickey marked this pull request as draft October 7, 2022 00:39
@pchickey pchickey force-pushed the pch/component_flags_pub branch from 5c4edb7 to 96ed12e Compare October 7, 2022 20:53
@pchickey pchickey force-pushed the pch/component_flags_pub branch from 96ed12e to 4762cdd Compare October 7, 2022 20:56
@pchickey pchickey marked this pull request as ready for review October 7, 2022 23:35
@pchickey pchickey merged commit 42d460f into main Oct 7, 2022
@pchickey pchickey deleted the pch/component_flags_pub branch October 7, 2022 23:36
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.

2 participants