Navigation Menu

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 --no-default <regex> flag #1930

Merged
merged 1 commit into from Nov 26, 2020

Conversation

varphone
Copy link
Contributor

Sometimes, we need customize the implement of Default for certain types,
In these cases, the nodefault annotation can be used to prevent bindgen
to autoderive the Default traits for a type.

@highfive
Copy link

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@varphone varphone force-pushed the feature/add-no-default-flag branch 2 times, most recently from 0442b30 to 78b5172 Compare November 25, 2020 13:54
@emilio
Copy link
Contributor

emilio commented Nov 25, 2020

This looks sensible over all, but it still marked as WIP, let me know when it's ready for review?

Thanks.

Copy link
Contributor Author

@varphone varphone left a comment

Choose a reason for hiding this comment

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

Everything looks great!

@varphone varphone marked this pull request as ready for review November 25, 2020 14:32
Copy link
Contributor

@emilio emilio 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 with those two bits fixed.

book/src/nodefault.md Outdated Show resolved Hide resolved
book/src/nodefault.md Outdated Show resolved Hide resolved
Sometimes, we need customize the implement of `Default` for certain types,
In these cases, the `nodefault` annotation can be used to prevent bindgen
to autoderive the `Default` traits for a type.
@emilio
Copy link
Contributor

emilio commented Nov 26, 2020

Thank you!

@emilio emilio merged commit d808261 into rust-lang:master Nov 26, 2020
@pvdrz pvdrz mentioned this pull request Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants