Auto merge of #11835 - servo:diy-as-unsafe-cell, r=nox

Use our copy of RefCell for style data

<!-- Please describe your changes on the following line: -->

This allows removing `#![feature(as_unsafe_cell)]` in geckolib and make progress towards #11815.

---
<!-- 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 part of #11815.

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require new tests because they don’t introduce no functional changes.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11835)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-06-23 09:19:28 -05:00 committed by GitHub
commit 3de14d9ca0
12 changed files with 483 additions and 11 deletions

View file

@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#![feature(as_unsafe_cell)]
#![feature(box_patterns)]
#![feature(box_syntax)]
#![feature(custom_derive)]

View file

@ -34,9 +34,9 @@ use core::nonzero::NonZero;
use data::{LayoutDataFlags, PrivateLayoutData};
use script_layout_interface::wrapper_traits::{LayoutNode, ThreadSafeLayoutNode};
use script_layout_interface::{OpaqueStyleAndLayoutData, PartialStyleAndLayoutData};
use std::cell::{Ref, RefCell, RefMut};
use style::computed_values::content::{self, ContentItem};
use style::properties::ComputedValues;
use style::refcell::{Ref, RefCell, RefMut};
pub type NonOpaqueStyleAndLayoutData = *mut RefCell<PrivateLayoutData>;