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 restricted visibility support to builders, build methods, setters, and fields #247

Merged
merged 3 commits into from Apr 19, 2022

Conversation

TedDriggs
Copy link
Collaborator

@TedDriggs TedDriggs commented Apr 6, 2022

  • Use Cow<syn::Visibility> to avoid unnecessary cloning
  • Make as_expressed_vis return a Result
  • Add Visibility::explicit

This will be updated for #246 soon.

* Use Cow<syn::Visibility> to avoid unnecessary cloning
* Make as_expressed_vis return a Result
* Add Visibility::explicit
@TedDriggs
Copy link
Collaborator Author

@indietyp want to take a look at this PR?

@TedDriggs TedDriggs changed the title Change FlagVisibility to support explicit visibilities Add restricted visibility support to builders, build methods, setters, and fields Apr 13, 2022
Copy link

@indietyp indietyp left a comment

Choose a reason for hiding this comment

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

looks good to me!

@TedDriggs
Copy link
Collaborator Author

@ijackson can I merge this without breaking your work on custom field types too badly?

@ijackson
Copy link
Contributor

Please go ahead, I can fix up conflicts. I don't want to block others' work.

Fields, setters, build methods, and builder structs can now be marked
as public, private, or have a restricted visibility with vis = "...".

Fixes #246
This defers conflict checking until the end so that every level can
participate, and errors are consistently generated.
@TedDriggs TedDriggs merged commit e9c9268 into master Apr 19, 2022
@TedDriggs TedDriggs deleted the explicit-vis branch April 19, 2022 13:05
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

3 participants