mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
servo: Merge #17149 - Update Rust nightly (from servo:rustup); r=emilio
Source-Repo: https://github.com/servo/servo Source-Revision: 9656341f43cc1bc415e07a0a0c919740280ad2ab --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 828f413975924753ab1370d64a824a7744a0733f
This commit is contained in:
parent
34e680df7b
commit
1771af7b85
@ -107,7 +107,7 @@ fn is_image_opaque(format: webrender_traits::ImageFormat, bytes: &[u8]) -> bool
|
||||
fn premultiply(data: &mut [u8]) {
|
||||
let length = data.len();
|
||||
|
||||
for i in (0..length).step_by(4) {
|
||||
for i in Iterator::step_by(0..length, 4) {
|
||||
let b = data[i + 0] as u32;
|
||||
let g = data[i + 1] as u32;
|
||||
let r = data[i + 2] as u32;
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#![deny(unsafe_code)]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(step_by)]
|
||||
#![feature(iterator_step_by)]
|
||||
|
||||
extern crate base64;
|
||||
extern crate brotli;
|
||||
|
@ -42,7 +42,7 @@ pub struct ImageMetadata {
|
||||
fn byte_swap_and_premultiply(data: &mut [u8]) {
|
||||
let length = data.len();
|
||||
|
||||
for i in (0..length).step_by(4) {
|
||||
for i in Iterator::step_by(0..length, 4) {
|
||||
let r = data[i + 2];
|
||||
let g = data[i + 1];
|
||||
let b = data[i + 0];
|
||||
|
@ -3,7 +3,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#![feature(box_syntax)]
|
||||
#![feature(step_by)]
|
||||
#![feature(iterator_step_by)]
|
||||
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
|
@ -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 ty = cx.tcx.type_of(def_id);
|
||||
let sig = cx.tcx.type_of(def_id).fn_sig();
|
||||
|
||||
for (arg, ty) in decl.inputs.iter().zip(ty.fn_args().0.iter()) {
|
||||
for (arg, ty) in decl.inputs.iter().zip(sig.inputs().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, ty.fn_ret().0, false) {
|
||||
if is_unrooted_ty(cx, sig.output().0, false) {
|
||||
cx.span_lint(UNROOTED_MUST_ROOT, decl.output.span(), "Type must be rooted")
|
||||
}
|
||||
}
|
||||
@ -218,15 +218,8 @@ impl<'a, 'b, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'b, 'tcx> {
|
||||
visit::walk_pat(self, pat);
|
||||
}
|
||||
|
||||
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_ty(&mut self, _: &'tcx hir::Ty) {}
|
||||
|
||||
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)
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
03bed655142dd5e42ba4539de53b3663d8a123e0
|
||||
2416e222ecae76a36e958a8f7c4ac8083eb1ca45
|
||||
|
Loading…
Reference in New Issue
Block a user