mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Fix the build for NLL
Test with `RUSTFLAGS="-Zborrowck=mir -Ztwo-phase-borrows" cargo build` https://internals.rust-lang.org/t/help-us-get-non-lexical-lifetimes-nll-over-the-finish-line/7807/7
This commit is contained in:
parent
a9627d233f
commit
1333b6ee45
5 changed files with 24 additions and 24 deletions
28
Cargo.lock
generated
28
Cargo.lock
generated
|
@ -1507,7 +1507,7 @@ dependencies = [
|
|||
"traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1987,7 +1987,7 @@ dependencies = [
|
|||
"string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"thin-slice 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"webrender_api 0.57.2 (git+https://github.com/servo/webrender)",
|
||||
"xml5ever 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2276,7 +2276,7 @@ dependencies = [
|
|||
"threadpool 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"uuid 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"webrender_api 0.57.2 (git+https://github.com/servo/webrender)",
|
||||
"ws 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2314,7 +2314,7 @@ dependencies = [
|
|||
"servo_arc 0.1.1",
|
||||
"servo_config 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"uuid 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"webrender_api 0.57.2 (git+https://github.com/servo/webrender)",
|
||||
]
|
||||
|
@ -2985,7 +2985,7 @@ dependencies = [
|
|||
"time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tinyfiledialogs 3.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"utf-8 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"uuid 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"webrender_api 0.57.2 (git+https://github.com/servo/webrender)",
|
||||
|
@ -3071,7 +3071,7 @@ dependencies = [
|
|||
"servo_url 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"webrender_api 0.57.2 (git+https://github.com/servo/webrender)",
|
||||
"webvr_traits 0.0.1",
|
||||
]
|
||||
|
@ -3300,7 +3300,7 @@ dependencies = [
|
|||
"serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_geometry 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3350,7 +3350,7 @@ dependencies = [
|
|||
"malloc_size_of_derive 0.0.1",
|
||||
"serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_rand 0.0.1",
|
||||
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"uuid 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -3803,7 +3803,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "url"
|
||||
version = "1.6.0"
|
||||
version = "1.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3817,7 +3817,7 @@ version = "0.2.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3938,7 +3938,7 @@ dependencies = [
|
|||
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3959,7 +3959,7 @@ dependencies = [
|
|||
"script_traits 0.0.1",
|
||||
"servo_config 0.0.1",
|
||||
"servo_url 0.0.1",
|
||||
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"uuid 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"webdriver 0.35.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -4133,7 +4133,7 @@ dependencies = [
|
|||
"rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -4535,7 +4535,7 @@ dependencies = [
|
|||
"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f"
|
||||
"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
|
||||
"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"
|
||||
"checksum url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa35e768d4daf1d85733418a49fb42e10d7f633e394fccab4ab7aba897053fe2"
|
||||
"checksum url 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23ef1b2df9b1541244318407f1ed96e754dab6efac4121dc1c4c16d38daf215e"
|
||||
"checksum url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74e7d099f1ee52f823d4bdd60c93c3602043c728f5db3b97bdb548467f7bddea"
|
||||
"checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47"
|
||||
"checksum utf-8 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b6f923c601c7ac48ef1d66f7d5b5b2d9a7ba9c51333ab75a3ddf8d0309185a56"
|
||||
|
|
|
@ -448,9 +448,9 @@ impl Flow for TableFlow {
|
|||
.sum::<f32>();
|
||||
|
||||
for &index in &constrained_column_inline_sizes_indices {
|
||||
let inline_size = self.column_computed_inline_sizes[index].size.0;
|
||||
self.column_computed_inline_sizes[index].size +=
|
||||
remaining_inline_size.scale_by(
|
||||
self.column_computed_inline_sizes[index].size.0 as f32 / total_minimum_size);
|
||||
remaining_inline_size.scale_by(inline_size as f32 / total_minimum_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -531,7 +531,7 @@ impl Flow for TableFlow {
|
|||
self.block_flow.build_display_list_for_block(state, border_painting_mode);
|
||||
|
||||
let iter = TableCellStyleIterator::new(&self);
|
||||
for mut style in iter {
|
||||
for style in iter {
|
||||
style.build_display_list(state)
|
||||
}
|
||||
}
|
||||
|
@ -964,7 +964,7 @@ impl<'a> Iterator for TableRowAndGroupIterator<'a> {
|
|||
match self.kids.next() {
|
||||
Some(kid) => {
|
||||
if kid.is_table_rowgroup() {
|
||||
let mut rowgroup = kid.as_table_rowgroup();
|
||||
let rowgroup = kid.as_table_rowgroup();
|
||||
let iter = rowgroup.block_flow.base.child_iter();
|
||||
self.group = Some((&rowgroup.block_flow.fragment, iter));
|
||||
self.next()
|
||||
|
@ -1010,7 +1010,7 @@ impl<'a> Iterator for MutTableRowAndGroupIterator<'a> {
|
|||
match self.kids.next() {
|
||||
Some(kid) => {
|
||||
if kid.is_table_rowgroup() {
|
||||
let mut rowgroup = kid.as_mut_table_rowgroup();
|
||||
let rowgroup = kid.as_mut_table_rowgroup();
|
||||
let iter = rowgroup.block_flow.base.child_iter_mut();
|
||||
self.group = Some((&rowgroup.block_flow.fragment, iter));
|
||||
self.next()
|
||||
|
|
|
@ -65,7 +65,7 @@ impl ImageData {
|
|||
if let Some(jsobject) = opt_jsobject {
|
||||
let cx = global.get_cx();
|
||||
typedarray!(in(cx) let array_res: Uint8ClampedArray = jsobject);
|
||||
let mut array = array_res
|
||||
let array = array_res
|
||||
.map_err(|_| Error::Type("Argument to Image data is not an Uint8ClampedArray".to_owned()))?;
|
||||
|
||||
let byte_len = array.as_slice().len() as u32;
|
||||
|
|
|
@ -1907,7 +1907,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
|
|||
|
||||
typedarray!(in(cx) let array_buffer: ArrayBuffer = data);
|
||||
let data_vec = match array_buffer {
|
||||
Ok(mut data) => data.to_vec(),
|
||||
Ok(data) => data.to_vec(),
|
||||
Err(_) => fallible_array_buffer_view_to_vec(cx, data)?,
|
||||
};
|
||||
|
||||
|
@ -1944,8 +1944,8 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
|
|||
fn BufferSubData(&self, target: u32, offset: i64, data: ArrayBufferViewOrArrayBuffer) {
|
||||
let data_vec = match data {
|
||||
// Typed array is rooted, so we can safely temporarily retrieve its slice
|
||||
ArrayBufferViewOrArrayBuffer::ArrayBuffer(mut inner) => inner.to_vec(),
|
||||
ArrayBufferViewOrArrayBuffer::ArrayBufferView(mut inner) => inner.to_vec(),
|
||||
ArrayBufferViewOrArrayBuffer::ArrayBuffer(inner) => inner.to_vec(),
|
||||
ArrayBufferViewOrArrayBuffer::ArrayBufferView(inner) => inner.to_vec(),
|
||||
};
|
||||
|
||||
let bound_buffer = handle_potential_webgl_error!(self, self.bound_buffer(target), return);
|
||||
|
|
|
@ -1153,7 +1153,7 @@ impl Window {
|
|||
pub fn cancel_all_tasks(&self) {
|
||||
let mut ignore_flags = self.ignore_further_async_events.borrow_mut();
|
||||
for task_source_name in TaskSourceName::all() {
|
||||
let mut flag = ignore_flags.entry(task_source_name).or_insert(Default::default());
|
||||
let flag = ignore_flags.entry(task_source_name).or_insert(Default::default());
|
||||
let cancelled = mem::replace(&mut *flag, Default::default());
|
||||
cancelled.store(true, Ordering::Relaxed);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue