servo: Revert "Update Rust nightly to 1.19.0-nightly (6165203c4 2017-06-03)"
authorAnthony Ramine <n.oxyde@gmail.com>
Sat, 03 Jun 2017 14:37:17 +0200
changeset 412663 1f8d2aee8537e49a248d5fca45a7b9b1c85d9654
parent 412662 bfaf3cbb87d5918fc2c1017a00de2294ec8262fb
child 412664 9b7b1057cfc67dfe606e522d19fff53da246dc5c
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
servo: Revert "Update Rust nightly to 1.19.0-nightly (6165203c4 2017-06-03)" This reverts commit f081380dc03dba9664877df2829097f32c40694a. Source-Repo: https://github.com/servo/servo Source-Revision: 56c961af5ab47cb314655e5e5cfaecdf1ddcff21
servo/components/net/image_cache.rs
servo/components/net/lib.rs
servo/components/net_traits/image/base.rs
servo/components/net_traits/lib.rs
servo/components/script_plugins/unrooted_must_root.rs
servo/rust-commit-hash
--- a/servo/components/net/image_cache.rs
+++ b/servo/components/net/image_cache.rs
@@ -94,17 +94,17 @@ fn is_image_opaque(format: webrender_tra
         webrender_traits::ImageFormat::A8 => false,
         webrender_traits::ImageFormat::Invalid | webrender_traits::ImageFormat::RGBAF32 => unreachable!(),
     }
 }
 
 fn premultiply(data: &mut [u8]) {
     let length = data.len();
 
-    for i in Iterator::step_by(0..length, 4) {
+    for i in (0..length).step_by(4) {
         let b = data[i + 0] as u32;
         let g = data[i + 1] as u32;
         let r = data[i + 2] as u32;
         let a = data[i + 3] as u32;
 
         data[i + 0] = (b * a / 255) as u8;
         data[i + 1] = (g * a / 255) as u8;
         data[i + 2] = (r * a / 255) as u8;
--- a/servo/components/net/lib.rs
+++ b/servo/components/net/lib.rs
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 #![deny(unsafe_code)]
 #![feature(box_syntax)]
-#![feature(iterator_step_by)]
+#![feature(step_by)]
 
 extern crate base64;
 extern crate brotli;
 extern crate cookie as cookie_rs;
 extern crate devtools_traits;
 extern crate flate2;
 extern crate hyper;
 extern crate hyper_openssl;
--- a/servo/components/net_traits/image/base.rs
+++ b/servo/components/net_traits/image/base.rs
@@ -37,17 +37,17 @@ pub struct ImageMetadata {
 
 // FIXME: Images must not be copied every frame. Instead we should atomically
 // reference count them.
 
 // TODO(pcwalton): Speed up with SIMD, or better yet, find some way to not do this.
 fn byte_swap_and_premultiply(data: &mut [u8]) {
     let length = data.len();
 
-    for i in Iterator::step_by(0..length, 4) {
+    for i in (0..length).step_by(4) {
         let r = data[i + 2];
         let g = data[i + 1];
         let b = data[i + 0];
 
         data[i + 0] = r;
         data[i + 1] = g;
         data[i + 2] = b;
     }
--- a/servo/components/net_traits/lib.rs
+++ b/servo/components/net_traits/lib.rs
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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(box_syntax)]
-#![feature(iterator_step_by)]
+#![feature(step_by)]
 
 #![deny(unsafe_code)]
 
 extern crate cookie as cookie_rs;
 extern crate heapsize;
 #[macro_use]
 extern crate heapsize_derive;
 extern crate hyper;
--- a/servo/components/script_plugins/unrooted_must_root.rs
+++ b/servo/components/script_plugins/unrooted_must_root.rs
@@ -135,26 +135,26 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> fo
             visit::FnKind::Method(n, _, _, _) => {
                 &*n.as_str() == "new" || n.as_str().starts_with("new_")
             }
             visit::FnKind::Closure(_) => return,
         };
 
         if !in_derive_expn(span) {
             let def_id = cx.tcx.hir.local_def_id(id);
-            let sig = cx.tcx.type_of(def_id).fn_sig();
+            let ty = cx.tcx.type_of(def_id);
 
-            for (arg, ty) in decl.inputs.iter().zip(sig.inputs().0.iter()) {
+            for (arg, ty) in decl.inputs.iter().zip(ty.fn_args().0.iter()) {
                 if is_unrooted_ty(cx, ty, false) {
                     cx.span_lint(UNROOTED_MUST_ROOT, arg.span, "Type must be rooted")
                 }
             }
 
             if !in_new_function {
-                if is_unrooted_ty(cx, sig.output().0, false) {
+                if is_unrooted_ty(cx, ty.fn_ret().0, false) {
                     cx.span_lint(UNROOTED_MUST_ROOT, decl.output.span(), "Type must be rooted")
                 }
             }
         }
 
         let mut visitor = FnDefVisitor {
             cx: cx,
             in_new_function: in_new_function,
@@ -213,14 +213,21 @@ impl<'a, 'b, 'tcx> visit::Visitor<'tcx> 
                             pat.span,
                             &format!("Expression of type {:?} must be rooted", ty))
             }
         }
 
         visit::walk_pat(self, pat);
     }
 
-    fn visit_ty(&mut self, _: &'tcx hir::Ty) {}
+    fn visit_fn(&mut self, kind: visit::FnKind<'tcx>, decl: &'tcx hir::FnDecl,
+                body: hir::BodyId, span: codemap::Span, id: ast::NodeId) {
+        if let visit::FnKind::Closure(_) = kind {
+            visit::walk_fn(self, kind, decl, body, span, id);
+        }
+    }
 
+    fn visit_foreign_item(&mut self, _: &'tcx hir::ForeignItem) {}
+    fn visit_ty(&mut self, _: &'tcx hir::Ty) { }
     fn nested_visit_map<'this>(&'this mut self) -> hir::intravisit::NestedVisitorMap<'this, 'tcx> {
         hir::intravisit::NestedVisitorMap::OnlyBodies(&self.cx.tcx.hir)
     }
 }
--- a/servo/rust-commit-hash
+++ b/servo/rust-commit-hash
@@ -1,1 +1,1 @@
-6165203c48420c6f77ea22113eb4ff66931410c3
+03bed655142dd5e42ba4539de53b3663d8a123e0