Skip to content
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

Replace the `define_matrix!` macro using a proc macro. #314

Merged
merged 11 commits into from Jan 12, 2019
Merged

Conversation

@emilio
Copy link
Member

emilio commented Jan 12, 2019

This will allow cbindgen to parse this without macro expansion, which will allow us to do it much faster, and at build-time.


This change is Reviewable

@emilio
Copy link
Member Author

emilio commented Jan 12, 2019

r? @nox / @kvark / @nical

@emilio
Copy link
Member Author

emilio commented Jan 12, 2019

@bors-servo r=nox

We could use a #[proc_macro_attribute] to generate the _unit field, but that's unstable in rustc 1.23 which is the current supported version, and it's not that much of a benefit. We could also generate #[repr(C)] but that would confuse cbindgen.

@bors-servo
Copy link
Contributor

bors-servo commented Jan 12, 2019

📌 Commit 9e0f245 has been approved by nox

@bors-servo
Copy link
Contributor

bors-servo commented Jan 12, 2019

Testing commit 9e0f245 with merge cc2b285...

bors-servo added a commit that referenced this pull request Jan 12, 2019
Replace the `define_matrix!` macro using a proc macro.

This will allow `cbindgen` to parse this without macro expansion, which will allow us to do it much faster, and at build-time.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/euclid/314)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jan 12, 2019

☀️ Test successful - checks-travis
Approved by: nox
Pushing cc2b285 to master...

@bors-servo bors-servo merged commit 9e0f245 into master Jan 12, 2019
3 checks passed
3 checks passed
Travis CI - Branch Build Passed
Details
Travis CI - Pull Request Build Passed
Details
homu Test successful
Details
@emilio emilio deleted the proc-macro branch Jan 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.