Skip to content

Avoid generating fields/methods for opaque objects #936

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

Merged
merged 2 commits into from
Aug 29, 2017

Conversation

jhod0
Copy link
Contributor

@jhod0 jhod0 commented Aug 29, 2017

WIP fix for issue #929

With libclang 4, passes all tests on my machine except dump_preprocessed_input, but that fails on the master branch as well

@fitzgen
Copy link
Member

fitzgen commented Aug 29, 2017

With libclang 4, passes all tests on my machine except dump_preprocessed_input, but that fails on the master branch as well

Hm... It doesn't fail for me with libclang 4, nor on CI. Can you share what your local failures look like?

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

Looks great!

Just a couple nitpicks below to be addressed and then we can merge this :)

Thanks @jhod0 !

debug_assert!(fields.is_empty());
debug_assert!(methods.is_empty());
// fields.clear();
// methods.clear();
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick: these commented out lines should be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

if is_opaque {
fields.clear();
methods.clear();
// Opaque item should not have generated methods, fields
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick: missing a period at the end of this sentence.

@fitzgen
Copy link
Member

fitzgen commented Aug 29, 2017

@bors-servo r+

Thanks again @jhod0 !

@bors-servo
Copy link

📌 Commit 034200a has been approved by fitzgen

@bors-servo
Copy link

⌛ Testing commit 034200a with merge 04fa978...

bors-servo pushed a commit that referenced this pull request Aug 29, 2017
Avoid generating fields/methods for opaque objects

WIP fix for issue #929

With libclang 4, passes all tests on my machine except `dump_preprocessed_input`, but that fails on the master branch as well
@jhod0
Copy link
Contributor Author

jhod0 commented Aug 29, 2017

As for the failing test, I had forgotten to add clang to my PATH. I added it and the test passes

@fitzgen
Copy link
Member

fitzgen commented Aug 29, 2017

As for the failing test, I had forgotten to add clang to my PATH. I added it and the test passes

Ah, great to hear that :)

@bors-servo
Copy link

☀️ Test successful - status-travis
Approved by: fitzgen
Pushing 04fa978 to master...

@bors-servo bors-servo merged commit 034200a into rust-lang:master Aug 29, 2017
@jhod0 jhod0 deleted the no_fieldgen_on_opaque branch August 30, 2017 04:26
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.

4 participants