diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2018-08-08 00:09:02 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2018-08-08 00:09:56 +0200 |
commit | d1733aa5029c5b97390a236d94eed916ddb64577 (patch) | |
tree | 44771b2adae4786a620d5569bf8682f8c1b81559 | |
parent | 5410505c12233f9f34bbb8c4c3d5d0ea58bc0c2c (diff) | |
download | servo-d1733aa5029c5b97390a236d94eed916ddb64577.tar.gz servo-d1733aa5029c5b97390a236d94eed916ddb64577.zip |
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
-rw-r--r-- | Cargo.lock | 36 | ||||
-rw-r--r-- | components/layout/table.rs | 10 | ||||
-rw-r--r-- | components/script/dom/imagedata.rs | 2 | ||||
-rw-r--r-- | components/script/dom/webglrenderingcontext.rs | 6 | ||||
-rw-r--r-- | components/script/dom/window.rs | 2 |
5 files changed, 28 insertions, 28 deletions
diff --git a/Cargo.lock b/Cargo.lock index 2afabed30bf..2f8f543c971 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1088,7 +1088,7 @@ dependencies = [ [[package]] name = "getopts" -version = "0.2.14" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1508,7 +1508,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.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1985,7 +1985,7 @@ dependencies = [ "smallvec 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.7.3 (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.7.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)", @@ -2274,7 +2274,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.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)", ] @@ -2311,7 +2311,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.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)", ] @@ -2990,7 +2990,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.7.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)", @@ -3076,7 +3076,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.7.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", ] @@ -3275,7 +3275,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)", "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.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3311,7 +3311,7 @@ dependencies = [ "embedder_traits 0.0.1", "env_logger 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3319,7 +3319,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.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3369,7 +3369,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.7.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)", ] @@ -3816,7 +3816,7 @@ dependencies = [ [[package]] name = "url" -version = "1.6.0" +version = "1.7.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)", @@ -3830,7 +3830,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.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3951,7 +3951,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.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3972,7 +3972,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.7.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)", ] @@ -4145,7 +4145,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.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4335,7 +4335,7 @@ dependencies = [ "checksum fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" "checksum gaol 0.0.1 (git+https://github.com/servo/gaol)" = "<none>" "checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518" -"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685" +"checksum getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "b900c08c1939860ce8b54dc6a89e26e00c04c380fd0e09796799bd7f12861e05" "checksum gif 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff3414b424657317e708489d2857d9575f4403698428b040b609b9d1c1a84a2c" "checksum gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a795170cbd85b5a7baa58d6d7525cae6a03e486859860c220f7ebbbdd379d0a" "checksum gleam 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0d41e7ac812597988fdae31c9baec3c6d35cadb8ad9ab88a9bf9c0f119ed66c2" @@ -4548,7 +4548,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.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2a321979c09843d272956e73700d12c4e7d3d92b2ee112b31548aef0d4efc5a6" "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" diff --git a/components/layout/table.rs b/components/layout/table.rs index 658a39d8e21..e36fd4b4e5a 100644 --- a/components/layout/table.rs +++ b/components/layout/table.rs @@ -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() diff --git a/components/script/dom/imagedata.rs b/components/script/dom/imagedata.rs index 9e80d86d089..e80914d8aea 100644 --- a/components/script/dom/imagedata.rs +++ b/components/script/dom/imagedata.rs @@ -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; diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index e265c83aa90..d520985aafe 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -1979,7 +1979,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)?, }; @@ -2016,8 +2016,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); diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 4d6fca64cbd..22fed1e1652 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -1117,7 +1117,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); } |