aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2017-06-03 14:37:17 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2017-06-03 14:37:17 +0200
commit56c961af5ab47cb314655e5e5cfaecdf1ddcff21 (patch)
tree247849ae354a65c003f50b1feaf9730795a295ed
parentbefb017f7f8b6d6387c3804dbf2f493cc297b85d (diff)
downloadservo-56c961af5ab47cb314655e5e5cfaecdf1ddcff21.tar.gz
servo-56c961af5ab47cb314655e5e5cfaecdf1ddcff21.zip
Revert "Update Rust nightly to 1.19.0-nightly (6165203c4 2017-06-03)"
This reverts commit f081380dc03dba9664877df2829097f32c40694a.
-rw-r--r--components/net/image_cache.rs2
-rw-r--r--components/net/lib.rs2
-rw-r--r--components/net_traits/image/base.rs2
-rw-r--r--components/net_traits/lib.rs2
-rw-r--r--components/script_plugins/unrooted_must_root.rs15
-rw-r--r--rust-commit-hash2
6 files changed, 16 insertions, 9 deletions
diff --git a/components/net/image_cache.rs b/components/net/image_cache.rs
index ebf31d2f5a1..b8467e5a461 100644
--- a/components/net/image_cache.rs
+++ b/components/net/image_cache.rs
@@ -99,7 +99,7 @@ fn is_image_opaque(format: webrender_traits::ImageFormat, bytes: &[u8]) -> bool
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;
diff --git a/components/net/lib.rs b/components/net/lib.rs
index f96a6fbf2c0..8f15def3948 100644
--- a/components/net/lib.rs
+++ b/components/net/lib.rs
@@ -4,7 +4,7 @@
#![deny(unsafe_code)]
#![feature(box_syntax)]
-#![feature(iterator_step_by)]
+#![feature(step_by)]
extern crate base64;
extern crate brotli;
diff --git a/components/net_traits/image/base.rs b/components/net_traits/image/base.rs
index a52ed0e717b..cae3cce8dde 100644
--- a/components/net_traits/image/base.rs
+++ b/components/net_traits/image/base.rs
@@ -42,7 +42,7 @@ pub struct ImageMetadata {
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];
diff --git a/components/net_traits/lib.rs b/components/net_traits/lib.rs
index 42808737db8..e1403386d54 100644
--- a/components/net_traits/lib.rs
+++ b/components/net_traits/lib.rs
@@ -3,7 +3,7 @@
* 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)]
diff --git a/components/script_plugins/unrooted_must_root.rs b/components/script_plugins/unrooted_must_root.rs
index ca7c70aeb75..844eb9b87e6 100644
--- a/components/script_plugins/unrooted_must_root.rs
+++ b/components/script_plugins/unrooted_must_root.rs
@@ -140,16 +140,16 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
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")
}
}
@@ -218,8 +218,15 @@ impl<'a, 'b, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'b, 'tcx> {
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)
}
diff --git a/rust-commit-hash b/rust-commit-hash
index 1299a854db2..ac9c5bcdd55 100644
--- a/rust-commit-hash
+++ b/rust-commit-hash
@@ -1 +1 @@
-6165203c48420c6f77ea22113eb4ff66931410c3
+03bed655142dd5e42ba4539de53b3663d8a123e0