From 3bcf64be7bd190f00522886f7fd557dcfc7c6d22 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 3 May 2018 12:14:41 +0200 Subject: [PATCH 1/4] Silence an 'unused' warning --- components/style/servo/restyle_damage.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/style/servo/restyle_damage.rs b/components/style/servo/restyle_damage.rs index da682119eaf..5cde20c9658 100644 --- a/components/style/servo/restyle_damage.rs +++ b/components/style/servo/restyle_damage.rs @@ -191,7 +191,8 @@ fn compute_damage(old: &ComputedValues, new: &ComputedValues) -> ServoRestyleDam // This should check every CSS property, as enumerated in the fields of // http://doc.servo.org/style/properties/struct.ComputedValues.html - restyle_damage_rebuild_and_reflow!( + // This uses short-circuiting boolean OR for its side effects and ignores the result. + let _ = restyle_damage_rebuild_and_reflow!( old, new, damage, From 82714e08a1c21885484ea210d543a12acd8b7e07 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Fri, 4 May 2018 11:33:32 +0200 Subject: [PATCH 2/4] Get a real parser, tidy --- python/tidy/servo_tidy/tidy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py index 1dcdfd17849..9208727cbb3 100644 --- a/python/tidy/servo_tidy/tidy.py +++ b/python/tidy/servo_tidy/tidy.py @@ -398,7 +398,8 @@ def check_toml(file_name, lines): for idx, line in enumerate(lines): if idx == 0 and "[workspace]" in line: raise StopIteration - if line.find("*") != -1: + line_without_comment, _, _ = line.partition("#") + if line_without_comment.find("*") != -1: yield (idx + 1, "found asterisk instead of minimum version number") for license_line in licenses_toml: ok_licensed |= (license_line in line) From 6059d0c467b9ca5470e372a6c5618fc4ccb4a648 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 3 May 2018 12:16:57 +0200 Subject: [PATCH 3/4] Fix a Cargo warning https://github.com/rust-lang/cargo/issues/5330 --- components/net/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/components/net/Cargo.toml b/components/net/Cargo.toml index 4aaeecf75d9..ae404846c2c 100644 --- a/components/net/Cargo.toml +++ b/components/net/Cargo.toml @@ -4,6 +4,7 @@ version = "0.0.1" authors = ["The Servo Project Developers"] license = "MPL-2.0" publish = false +autotests = false # Inhibit lookup for tests/*.rs without [[test]] sections [lib] name = "net" From 46ad8110172cfc9d8d420e8eb41863f3d394e24d Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 3 May 2018 12:05:52 +0200 Subject: [PATCH 4/4] Upgrade to rustc 1.27.0-nightly (8a37c75a3 2018-05-02) --- components/allocator/lib.rs | 7 +------ components/dom_struct/lib.rs | 2 +- components/gfx/lib.rs | 3 --- components/script_plugins/unrooted_must_root.rs | 4 ++-- components/script_plugins/utils.rs | 2 +- rust-toolchain | 2 +- 6 files changed, 6 insertions(+), 14 deletions(-) diff --git a/components/allocator/lib.rs b/components/allocator/lib.rs index 3d933599688..c2f2d9796a4 100644 --- a/components/allocator/lib.rs +++ b/components/allocator/lib.rs @@ -17,7 +17,7 @@ pub use platform::*; mod platform { extern crate jemalloc_sys as ffi; - use std::alloc::{GlobalAlloc, Layout, Opaque, System}; + use std::alloc::{GlobalAlloc, Layout, Opaque}; use std::os::raw::{c_int, c_void}; /// Get the size of a heap block. @@ -94,11 +94,6 @@ mod platform { let flags = layout_to_flags(layout.align(), new_size); ffi::rallocx(ptr as *mut _, new_size, flags) as *mut Opaque } - - #[inline] - fn oom(&self) -> ! { - System.oom() - } } } diff --git a/components/dom_struct/lib.rs b/components/dom_struct/lib.rs index 86c7134a78f..ecf74684c39 100644 --- a/components/dom_struct/lib.rs +++ b/components/dom_struct/lib.rs @@ -2,7 +2,7 @@ * 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(proc_macro)] +#![feature(proc_macro, proc_macro_non_items)] extern crate proc_macro; diff --git a/components/gfx/lib.rs b/components/gfx/lib.rs index 9b1b455b6a4..156170c40cf 100644 --- a/components/gfx/lib.rs +++ b/components/gfx/lib.rs @@ -2,9 +2,6 @@ * 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/. */ -// For SIMD -#![cfg_attr(feature = "unstable", feature(cfg_target_feature))] - #![deny(unsafe_code)] extern crate app_units; diff --git a/components/script_plugins/unrooted_must_root.rs b/components/script_plugins/unrooted_must_root.rs index 502ae03de12..6277b309c0c 100644 --- a/components/script_plugins/unrooted_must_root.rs +++ b/components/script_plugins/unrooted_must_root.rs @@ -143,14 +143,14 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass { let def_id = cx.tcx.hir.local_def_id(id); let sig = cx.tcx.type_of(def_id).fn_sig(cx.tcx); - for (arg, ty) in decl.inputs.iter().zip(sig.inputs().0.iter()) { + for (arg, ty) in decl.inputs.iter().zip(sig.inputs().skip_binder().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, sig.output().skip_binder(), false) { cx.span_lint(UNROOTED_MUST_ROOT, decl.output.span(), "Type must be rooted") } } diff --git a/components/script_plugins/utils.rs b/components/script_plugins/utils.rs index 45a348ea14f..0999467545b 100644 --- a/components/script_plugins/utils.rs +++ b/components/script_plugins/utils.rs @@ -25,7 +25,7 @@ pub fn match_def_path(cx: &LateContext, def_id: DefId, path: &[&str]) -> bool { other.into_iter() .map(|e| e.data) .zip(path) - .all(|(nm, p)| &*nm.as_interned_str() == *p) + .all(|(nm, p)| nm.as_interned_str().with(|nm| nm == *p)) } pub fn in_derive_expn(span: Span) -> bool { diff --git a/rust-toolchain b/rust-toolchain index 84ce4f35a64..01157e91c16 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2018-04-15 +nightly-2018-05-03