Skip to content

Add bindgen::Builder::derive_copy #952

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 3 commits into from
Sep 6, 2017
Merged

Conversation

mchlrhw
Copy link
Contributor

@mchlrhw mchlrhw commented Sep 6, 2017

Fixes #948

@fitzgen
Copy link
Member

fitzgen commented Sep 6, 2017

Thanks for the PR @mchlrhw ! The code looks great, but we need a test before we merge this.

Can you add something like this to tests/headers/do-not-derive-copy.hpp:

// bindgen-flags: --no-derive-copy

class WouldBeCopyButWeAreNotDerivingCopy {
    int x;
};

And then verify that the generated tests/expectations/tests/do-not-derive-copy.rs file doesn't add a derive(Copy).

Thanks again!

@mchlrhw
Copy link
Contributor Author

mchlrhw commented Sep 6, 2017

Cool, thanks for pointing me in the right direction. I wasn't quite sure how testing worked, but your message and CONTRIBUTING.md really helped!

@fitzgen
Copy link
Member

fitzgen commented Sep 6, 2017

Cool, thanks for pointing me in the right direction. I wasn't quite sure how testing worked, but your message and CONTRIBUTING.md really helped!

Glad to hear that :)

@fitzgen
Copy link
Member

fitzgen commented Sep 6, 2017

@bors-servo r+

@bors-servo
Copy link

📌 Commit 537a49e has been approved by fitzgen

@bors-servo
Copy link

⌛ Testing commit 537a49e with merge 1e49750...

bors-servo pushed a commit that referenced this pull request Sep 6, 2017
Add `bindgen::Builder::derive_copy`

Fixes #948
@bors-servo
Copy link

☀️ Test successful - status-travis
Approved by: fitzgen
Pushing 1e49750 to master...

@bors-servo bors-servo merged commit 537a49e into rust-lang:master Sep 6, 2017
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