-
Notifications
You must be signed in to change notification settings - Fork 698
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-hash <regex> flag #1105
Conversation
☔ The latest upstream changes (presumably #1099) made this pull request unmergeable. Please resolve the merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect! Thanks @seemyvest ! 👍
@bors-servo delegate+ Ah, looks like some merge conflicts snuck in. Once you've rebased and resolved them you can tell Thanks again! |
✌️ @seemyvest can now approve this pull request |
No problem :) @bors-servo r+ I'll have a look and see what others I can do, feel free to point some out to me :) |
📌 Commit 5d27156 has been approved by |
Add --no-hash <regex> flag Issue #964 - [x] Adding a new RegexSet member to bindgen::Builder (similar to the whitelisted_types set). - [x] A Builder method to add strings to that RegexSet. - [x] Plumbing in src/options.rs to convert --no-hash <regex> CLI flags into invocations of the builder method. - [x] Making the MonotoneFramework::constrain function in src/ir/analysis/derive_hash.rs check if the given item is explicitly marked not to be Hash, and if so, inserting it into the self.cannot_derive_hash set via return self.insert(id). - [x] Tests! - [x] When the no-hash type is transitively referenced by a whitelisted item - [x] When the no-hash type is explicitly whitelisted - [x] When the no-hash type is marked opaque r? @fitzgen
☀️ Test successful - status-travis |
give better variable name Fixing up a comment from #1105
Issue #964
Adding a new RegexSet member to bindgen::Builder (similar to the whitelisted_types set).
A Builder method to add strings to that RegexSet.
Plumbing in src/options.rs to convert --no-hash CLI flags into invocations of the builder method.
Making the MonotoneFramework::constrain function in src/ir/analysis/derive_hash.rs check if the given item is explicitly marked not to be Hash, and if so, inserting it into the self.cannot_derive_hash set via return self.insert(id).
Tests!
When the no-hash type is transitively referenced by a whitelisted item
When the no-hash type is explicitly whitelisted
When the no-hash type is marked opaque
r? @fitzgen