Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upMake bitfields larger than type opaque #1060
Conversation
highfive
added
the
S-awaiting-review
label
Oct 4, 2017
fitzgen
reviewed
Oct 4, 2017
|
Looks great! Two tiny little nitpicks and then we can merge this :) |
src/ir/comp.rs
Outdated
| return true | ||
| } | ||
|
|
||
| let has_large_bitfield = self.fields().iter().any(|f| match *f { |
This comment has been minimized.
This comment has been minimized.
fitzgen
Oct 4, 2017
Member
Nitpick: rather than assigning the bool expression to a variable and then returning the variable, we should return the expression directly.
src/ir/comp.rs
Outdated
| fn is_opaque(&self, _: &BindgenContext, _: &()) -> bool { | ||
| self.has_non_type_template_params | ||
| fn is_opaque(&self, ctx: &BindgenContext, _: &()) -> bool { | ||
| //Early return to avoid extra computation |
This comment has been minimized.
This comment has been minimized.
fitzgen
Oct 4, 2017
Member
Nitpick: space between // and Early, and a period at the end of the sentence please :)
This comment has been minimized.
This comment has been minimized.
|
@bors-servo r+ |
This comment has been minimized.
This comment has been minimized.
|
|
highfive
assigned
fitzgen
Oct 5, 2017
highfive
added
S-awaiting-merge
and removed
S-awaiting-review
labels
Oct 5, 2017
This comment has been minimized.
This comment has been minimized.
bors-servo
added a commit
that referenced
this pull request
Oct 5, 2017
This comment has been minimized.
This comment has been minimized.
|
|
bors-servo
merged commit aa27283
into
rust-lang:master
Oct 5, 2017
highfive
removed
the
S-awaiting-merge
label
Oct 5, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
aeleos commentedOct 4, 2017
@fitzgen r?
Fixes #1007 by ensuring that bitfields larger than type will be opaque, ensuring the layout is correct.