Skip to content

Fix a recent template-specialization-related regression. #470

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
Feb 3, 2017

Conversation

emilio
Copy link
Contributor

@emilio emilio commented Feb 3, 2017

This fixes a regression with stylo bindings after the function pointer PR.
@emilio
Copy link
Contributor Author

emilio commented Feb 3, 2017

r? @fitzgen

@highfive highfive assigned fitzgen and unassigned upsuper Feb 3, 2017
@emilio
Copy link
Contributor Author

emilio commented Feb 3, 2017

cpp/TypeTraits.h:3:10: fatal error: 'type_traits' file not found

I'll have to drop the second commit before landing I guess :(

@upsuper
Copy link
Contributor

upsuper commented Feb 3, 2017

You may need to add -std=c++11 since type_traits is added in C++11.

@emilio
Copy link
Contributor Author

emilio commented Feb 3, 2017

I already do that though, right?

@upsuper
Copy link
Contributor

upsuper commented Feb 3, 2017

Probably also -stdlib=libc++?

@emilio
Copy link
Contributor Author

emilio commented Feb 3, 2017

Let's try, thanks for the suggestion :)

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.

LGTM, thanks!

@@ -22,6 +22,18 @@ fn main() {
.generate()
.expect("Unable to generate bindings");

// Just tests that parsing <type_traits> doesn't crash, since we've have
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick: "we've have" -> "we've had"

@@ -22,6 +22,18 @@ fn main() {
.generate()
.expect("Unable to generate bindings");

// Just tests that parsing <type_traits> doesn't crash, since we've have
// multiple hard-to-reduce regressions in that header.
Copy link
Member

Choose a reason for hiding this comment

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

Aside: have you tried creducing the post-preprocessed test case? creduce can usually do a better job than trying to reduce manually.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nope, should try

@fitzgen
Copy link
Member

fitzgen commented Feb 3, 2017

Dang :(

cpp/TypeTraits.h:3:10: fatal error: 'type_traits' file not found

Seems to only be on linux, though. Perhaps we can if cfg!(target_os = "linux") { ... } and manually add /usr/include/c++/<version>/type_traits? Perhaps leveraging the glob crate?

Another possibility is to just pull in the post-preprocessed type_traits file into our test suite directly.

@emilio
Copy link
Contributor Author

emilio commented Feb 3, 2017

I wouldn't want to block on that for now, I'll open a new PR to figure out how to make travis happy.

@bors-servo r=fitzgen

@bors-servo
Copy link

📌 Commit 439d89d has been approved by fitzgen

@bors-servo
Copy link

⌛ Testing commit 439d89d with merge eede09e...

bors-servo pushed a commit that referenced this pull request Feb 3, 2017
Fix a recent template-specialization-related regression.

r? @upsuper
@bors-servo
Copy link

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

@bors-servo bors-servo merged commit 439d89d into rust-lang:master Feb 3, 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.

5 participants