This reduces a decent amount of overhead in #13778.
r? @SimonSapin
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
<!-- Either: -->
- [x] There are tests for these changes OR
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Source-Repo: https://github.com/servo/servo
Source-Revision: 164e956944db0d1d873d2f6eeb9eb59e3f46dc5f
<!-- Please describe your changes on the following line: -->
This will allow types to be generic over our local `ToCss`
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
<!-- Either: -->
- [x] These changes do not require tests because it's a refactor
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Source-Repo: https://github.com/servo/servo
Source-Revision: f48b3fe2197a59b29bc711fb1b5496cbb97bd330
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [x] There are tests for these changes OR
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Source-Repo: https://github.com/servo/servo
Source-Revision: 51bb125189df1dcdb0e31f8b7665693d28b0d008
<!-- Please describe your changes on the following line: -->
r? @SimonSapin
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
<!-- Either: -->
- [x] There are tests for these changes OR
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
In order to clamp them at computed value time.
Source-Repo: https://github.com/servo/servo
Source-Revision: fbf77e40fefee85bab516adc0ca5d963f55e557b
<!-- Please describe your changes on the following line: -->
The bulk of this is adding cargo features to make derived implementations of `heapsize` and `serde` traits optional.
"Almost" because `std::intrinsics::discriminant_value` is currently unstable and doesn’t have any stable replacement that I know of. For now, this PR conditionally replaces it with `unimplemented!()`.
r? @nox
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes <s>fix</s> are part of #11815 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not <s>require tests</s> *have tests yet* because that requires https://github.com/servo/servo/issues/11806, but I still want to land this before it bitrots. (Tests should check that the build succeeds with a stable compiler.)
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Source-Repo: https://github.com/servo/servo
Source-Revision: 0fb5d634a007f3d0424f95569ac3f83d500d054c