mirror of
https://github.com/servo/servo.git
synced 2025-06-11 01:50:10 +00:00
Upgrade to rustc 1.19.0-nightly (ced823e26 2017-05-07)
This commit is contained in:
parent
bd2cd40c50
commit
02e1901bc1
10 changed files with 37 additions and 37 deletions
18
Cargo.lock
generated
18
Cargo.lock
generated
|
@ -412,12 +412,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
name = "compiletest_helper"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"compiletest_rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"compiletest_rs 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "compiletest_rs"
|
||||
version = "0.2.5"
|
||||
version = "0.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1163,7 +1163,7 @@ dependencies = [
|
|||
"markup5ever 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tendril 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tendril 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1314,7 +1314,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "js"
|
||||
version = "0.1.4"
|
||||
source = "git+https://github.com/servo/rust-mozjs#5ba3550c8d1535e0ab66495588f3a46885373c83"
|
||||
source = "git+https://github.com/servo/rust-mozjs#08af3654a1e781af7d6690838545975234ddd2a0"
|
||||
dependencies = [
|
||||
"cmake 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1574,7 +1574,7 @@ dependencies = [
|
|||
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"string_cache_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tendril 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tendril 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2940,7 +2940,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tendril"
|
||||
version = "0.2.3"
|
||||
version = "0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3338,7 +3338,7 @@ dependencies = [
|
|||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"markup5ever 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tendril 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tendril 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -3386,7 +3386,7 @@ dependencies = [
|
|||
"checksum cmake 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "d18d68987ed4c516dcc3e7913659bfa4076f5182eea4a7e0038bb060953e76ac"
|
||||
"checksum cocoa 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0a5d0bcb4d345adf9b4ada6c5bb3e2b87c8150b79c46f3f26446de5f4d48de4b"
|
||||
"checksum color_quant 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a475fc4af42d83d28adf72968d9bcfaf035a1a9381642d8e85d8a04957767b0d"
|
||||
"checksum compiletest_rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f3f344389765ad7bec166f64c1b39ed6dd2b54d81c4c5dd8af789169351d380c"
|
||||
"checksum compiletest_rs 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "df47edea8bf052f23ce25a15cbf0be09c96911e3be943d1e81415bfaf0e74bf8"
|
||||
"checksum cookie 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce776927cd64cbe74ebd1d9b375edb9d1b6bfa808618ddf9548645e019ebdfbb"
|
||||
"checksum core-foundation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f51ce3b8ebe311c56de14231eb57572c15abebd2d32b3bcb99bcdb9c101f5ac3"
|
||||
"checksum core-foundation-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "41115a6aa5d3e1e5ef98148373f25971d1fad53818553f216495f9e67e90a624"
|
||||
|
@ -3567,7 +3567,7 @@ dependencies = [
|
|||
"checksum syntex_pos 0.54.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8df3921c7945dfb9ffc53aa35adb2cf4313b5ab5f079c3619b3d4eb82a0efc2b"
|
||||
"checksum syntex_syntax 0.54.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dc960085bae44591e22d01f6c0e82a8aec832f8659aca556cdf8ecbdac2bb47b"
|
||||
"checksum target_build_utils 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f42dc058080c19c6a58bdd1bf962904ee4f5ef1fe2a81b529f31dacc750c679f"
|
||||
"checksum tendril 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cebf864c2d90394a1b66d6fe45963f9a177f2af81a0edea5060f77627f9c4587"
|
||||
"checksum tendril 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4ce04c250d202db8004921e3d3bc95eaa4f2126c6937a428ae39d12d0e38df62"
|
||||
"checksum term 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d168af3930b369cfe245132550579d47dfd873d69470755a19c2c6568dbbd989"
|
||||
"checksum term_size 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "07b6c1ac5b3fffd75073276bca1ceed01f67a28537097a2a9539e116e50fb21a"
|
||||
"checksum thread-id 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4437c97558c70d129e40629a5b385b3fb1ffac301e63941335e4d354081ec14a"
|
||||
|
|
|
@ -15,6 +15,6 @@ euclid = "0.11"
|
|||
heapsize = "0.3.0"
|
||||
heapsize_derive = "0.1"
|
||||
ipc-channel = "0.7"
|
||||
serde = {version = "0.9", features = ["unstable"]}
|
||||
serde = "0.9"
|
||||
serde_derive = "0.9"
|
||||
webrender_traits = {git = "https://github.com/servo/webrender", features = ["ipc"]}
|
||||
|
|
|
@ -164,7 +164,7 @@ impl Shaper {
|
|||
Shaper::float_to_fixed(pt_size) as c_int);
|
||||
|
||||
// configure static function callbacks.
|
||||
hb_font_set_funcs(hb_font, **HB_FONT_FUNCS, font as *mut Font as *mut c_void, None);
|
||||
hb_font_set_funcs(hb_font, HB_FONT_FUNCS.as_ptr(), font as *mut Font as *mut c_void, None);
|
||||
|
||||
Shaper {
|
||||
hb_face: hb_face,
|
||||
|
|
|
@ -43,7 +43,7 @@ use style::selector_parser::RestyleDamage;
|
|||
pub type NonOpaqueStyleAndLayoutData = AtomicRefCell<PersistentLayoutData>;
|
||||
|
||||
pub unsafe fn drop_style_and_layout_data(data: OpaqueStyleAndLayoutData) {
|
||||
let ptr: *mut AtomicRefCell<PartialPersistentLayoutData> = *data.ptr;
|
||||
let ptr: *mut AtomicRefCell<PartialPersistentLayoutData> = data.ptr.get();
|
||||
let non_opaque: *mut NonOpaqueStyleAndLayoutData = ptr as *mut _;
|
||||
let _ = Box::from_raw(non_opaque);
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ pub trait GetRawData {
|
|||
impl<T: GetLayoutData> GetRawData for T {
|
||||
fn get_raw_data(&self) -> Option<&NonOpaqueStyleAndLayoutData> {
|
||||
self.get_style_and_layout_data().map(|opaque| {
|
||||
let container = *opaque.ptr as *mut NonOpaqueStyleAndLayoutData;
|
||||
let container = opaque.ptr.get() as *mut NonOpaqueStyleAndLayoutData;
|
||||
unsafe { &*container }
|
||||
})
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ impl AtomicOptThreadId {
|
|||
AtomicOptThreadId(AtomicUsize::new(0))
|
||||
}
|
||||
pub fn store(&self, value: Option<ThreadId>, ordering: Ordering) {
|
||||
let number = value.map(|id| *id.0).unwrap_or(0);
|
||||
let number = value.map(|id| id.0.get()).unwrap_or(0);
|
||||
self.0.store(number, ordering);
|
||||
}
|
||||
#[allow(unsafe_code)]
|
||||
|
@ -63,7 +63,7 @@ impl AtomicOptThreadId {
|
|||
}
|
||||
#[allow(unsafe_code)]
|
||||
pub fn swap(&self, value: Option<ThreadId>, ordering: Ordering) -> Option<ThreadId> {
|
||||
let number = value.map(|id| *id.0).unwrap_or(0);
|
||||
let number = value.map(|id| id.0.get()).unwrap_or(0);
|
||||
let number = self.0.swap(number, ordering);
|
||||
if number == 0 { None } else { Some(ThreadId(unsafe { NonZero::new(number) })) }
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ impl<T: DomObject> Deref for JS<T> {
|
|||
debug_assert!(thread_state::get().is_script());
|
||||
// We can only have &JS<T> from a rooted thing, so it's safe to deref
|
||||
// it to &T.
|
||||
unsafe { &**self.ptr }
|
||||
unsafe { &*self.ptr.get() }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ unsafe impl<T: DomObject> JSTraceable for JS<T> {
|
|||
|
||||
trace_reflector(trc,
|
||||
trace_info,
|
||||
(**self.ptr).reflector());
|
||||
(*self.ptr.get()).reflector());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,7 +133,7 @@ impl<T: Castable> LayoutJS<T> {
|
|||
T: DerivedFrom<U>
|
||||
{
|
||||
debug_assert!(thread_state::get().is_layout());
|
||||
let ptr: *const T = *self.ptr;
|
||||
let ptr: *const T = self.ptr.get();
|
||||
LayoutJS {
|
||||
ptr: unsafe { NonZero::new(ptr as *const U) },
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ impl<T: Castable> LayoutJS<T> {
|
|||
debug_assert!(thread_state::get().is_layout());
|
||||
unsafe {
|
||||
if (*self.unsafe_get()).is::<U>() {
|
||||
let ptr: *const T = *self.ptr;
|
||||
let ptr: *const T = self.ptr.get();
|
||||
Some(LayoutJS {
|
||||
ptr: NonZero::new(ptr as *const U),
|
||||
})
|
||||
|
@ -161,7 +161,7 @@ impl<T: DomObject> LayoutJS<T> {
|
|||
/// Get the reflector.
|
||||
pub unsafe fn get_jsobject(&self) -> *mut JSObject {
|
||||
debug_assert!(thread_state::get().is_layout());
|
||||
(**self.ptr).reflector().get_jsobject().get()
|
||||
(*self.ptr.get()).reflector().get_jsobject().get()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -397,7 +397,7 @@ impl<T: DomObject> LayoutJS<T> {
|
|||
/// this is unsafe is what necessitates the layout wrappers.)
|
||||
pub unsafe fn unsafe_get(&self) -> *const T {
|
||||
debug_assert!(thread_state::get().is_layout());
|
||||
*self.ptr
|
||||
self.ptr.get()
|
||||
}
|
||||
|
||||
/// Returns a reference to the interior of this JS object. This method is
|
||||
|
@ -405,7 +405,7 @@ impl<T: DomObject> LayoutJS<T> {
|
|||
/// mutate DOM nodes.
|
||||
pub fn get_for_script(&self) -> &T {
|
||||
debug_assert!(thread_state::get().is_script());
|
||||
unsafe { &**self.ptr }
|
||||
unsafe { &*self.ptr.get() }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -544,7 +544,7 @@ impl<T: DomObject> Root<T> {
|
|||
debug_assert!(thread_state::get().is_script());
|
||||
STACK_ROOTS.with(|ref collection| {
|
||||
let RootCollectionPtr(collection) = collection.get().unwrap();
|
||||
unsafe { (*collection).root(&*(**unrooted).reflector()) }
|
||||
unsafe { (*collection).root(&*(*unrooted.get()).reflector()) }
|
||||
Root {
|
||||
ptr: unrooted,
|
||||
root_list: collection,
|
||||
|
@ -554,7 +554,7 @@ impl<T: DomObject> Root<T> {
|
|||
|
||||
/// Generate a new root from a reference
|
||||
pub fn from_ref(unrooted: &T) -> Root<T> {
|
||||
Root::new(unsafe { NonZero::new(&*unrooted) })
|
||||
Root::new(unsafe { NonZero::new(unrooted) })
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -569,7 +569,7 @@ impl<T: DomObject> Deref for Root<T> {
|
|||
type Target = T;
|
||||
fn deref(&self) -> &T {
|
||||
debug_assert!(thread_state::get().is_script());
|
||||
unsafe { &**self.ptr.deref() }
|
||||
unsafe { &*self.ptr.get() }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -86,19 +86,19 @@ impl<T: WeakReferenceable> WeakRef<T> {
|
|||
|
||||
/// Root a weak reference. Returns `None` if the object was already collected.
|
||||
pub fn root(&self) -> Option<Root<T>> {
|
||||
unsafe { &**self.ptr }.value.get().map(Root::new)
|
||||
unsafe { &*self.ptr.get() }.value.get().map(Root::new)
|
||||
}
|
||||
|
||||
/// Return whether the weakly-referenced object is still alive.
|
||||
pub fn is_alive(&self) -> bool {
|
||||
unsafe { &**self.ptr }.value.get().is_some()
|
||||
unsafe { &*self.ptr.get() }.value.get().is_some()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: WeakReferenceable> Clone for WeakRef<T> {
|
||||
fn clone(&self) -> WeakRef<T> {
|
||||
unsafe {
|
||||
let box_ = &**self.ptr;
|
||||
let box_ = &*self.ptr.get();
|
||||
let new_count = box_.count.get() + 1;
|
||||
box_.count.set(new_count);
|
||||
WeakRef {
|
||||
|
@ -117,7 +117,7 @@ impl<T: WeakReferenceable> HeapSizeOf for WeakRef<T> {
|
|||
impl<T: WeakReferenceable> PartialEq for WeakRef<T> {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
unsafe {
|
||||
(**self.ptr).value.get() == (**other.ptr).value.get()
|
||||
(*self.ptr.get()).value.get() == (*other.ptr.get()).value.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -125,8 +125,8 @@ impl<T: WeakReferenceable> PartialEq for WeakRef<T> {
|
|||
impl<T: WeakReferenceable> PartialEq<T> for WeakRef<T> {
|
||||
fn eq(&self, other: &T) -> bool {
|
||||
unsafe {
|
||||
match (**self.ptr).value.get() {
|
||||
Some(ptr) => *ptr == other,
|
||||
match (*self.ptr.get()).value.get() {
|
||||
Some(ptr) => ptr.get() == other,
|
||||
None => false,
|
||||
}
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ impl<T: WeakReferenceable> Drop for WeakRef<T> {
|
|||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
let (count, value) = {
|
||||
let weak_box = &**self.ptr;
|
||||
let weak_box = &*self.ptr.get();
|
||||
assert!(weak_box.count.get() > 0);
|
||||
let count = weak_box.count.get() - 1;
|
||||
weak_box.count.set(count);
|
||||
|
@ -151,7 +151,7 @@ impl<T: WeakReferenceable> Drop for WeakRef<T> {
|
|||
};
|
||||
if count == 0 {
|
||||
assert!(value.is_none());
|
||||
mem::drop(Box::from_raw(*self.ptr));
|
||||
mem::drop(Box::from_raw(self.ptr.get()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -442,7 +442,7 @@ impl<'le> TElement for ServoLayoutElement<'le> {
|
|||
fn get_data(&self) -> Option<&AtomicRefCell<ElementData>> {
|
||||
unsafe {
|
||||
self.get_style_and_layout_data().map(|d| {
|
||||
let ppld: &AtomicRefCell<PartialPersistentLayoutData> = &**d.ptr;
|
||||
let ppld: &AtomicRefCell<PartialPersistentLayoutData> = &*d.ptr.get();
|
||||
let psd: &AtomicRefCell<ElementData> = transmute(ppld);
|
||||
psd
|
||||
})
|
||||
|
@ -505,7 +505,7 @@ impl<'le> ServoLayoutElement<'le> {
|
|||
|
||||
fn get_partial_layout_data(&self) -> Option<&AtomicRefCell<PartialPersistentLayoutData>> {
|
||||
unsafe {
|
||||
self.get_style_and_layout_data().map(|d| &**d.ptr)
|
||||
self.get_style_and_layout_data().map(|d| &*d.ptr.get())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ doctest = false
|
|||
[features]
|
||||
gecko = ["nsstring_vendor", "rayon/unstable", "num_cpus", "style_traits/gecko"]
|
||||
use_bindgen = ["bindgen", "regex"]
|
||||
servo = ["serde/unstable", "serde", "serde_derive", "heapsize", "heapsize_derive",
|
||||
servo = ["serde", "serde_derive", "heapsize", "heapsize_derive",
|
||||
"style_traits/servo", "servo_atoms", "servo_config", "html5ever",
|
||||
"cssparser/heapsize", "cssparser/serde", "encoding", "smallvec/heapsizeof",
|
||||
"rayon/unstable", "servo_url"]
|
||||
|
|
|
@ -1 +1 @@
|
|||
06fb4d25642a3f223db1441972dd5962085cfba1
|
||||
ced823e267c132fab172b1890b24073995e79ffa
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue