servo: Merge #14481 - Update Rust to 1.15.0-nightly (8f02c429a 2016-12-15) (from servo:rustup); r=Ms2ger
authorMs2ger <Ms2ger@gmail.com>
Mon, 19 Dec 2016 03:58:56 -0800
changeset 387017 0f4177e3b6dca3456a4a85fee5eb6170fafa4fa6
parent 387016 4853d6540a1cc9fdf10dc22c085d9abc42a4faaa
child 387018 b3e1a421b5dfce3df9d18ae9b49d963d3014c584
push id7198
push userjlorenzo@mozilla.com
push dateTue, 18 Apr 2017 12:07:49 +0000
treeherdermozilla-beta@d57aa49c3948 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMs2ger
servo: Merge #14481 - Update Rust to 1.15.0-nightly (8f02c429a 2016-12-15) (from servo:rustup); r=Ms2ger Source-Repo: https://github.com/servo/servo Source-Revision: 077a54de19ad6336cc6fae5fb4d9897535f67c2b
servo/Cargo.lock
servo/components/plugins/lints/inheritance_integrity.rs
servo/components/plugins/lints/privatize.rs
servo/components/plugins/lints/transmute_type.rs
servo/components/plugins/lints/unrooted_must_root.rs
servo/ports/cef/lib.rs
servo/ports/cef/string_list.rs
servo/ports/cef/window.rs
servo/ports/cef/wrappers.rs
servo/rust-nightly-date
--- a/servo/Cargo.lock
+++ b/servo/Cargo.lock
@@ -363,22 +363,22 @@ dependencies = [
 name = "color_quant"
 version = "1.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "compiletest_helper"
 version = "0.0.1"
 dependencies = [
- "compiletest_rs 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "compiletest_rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "compiletest_rs"
-version = "0.2.4"
+version = "0.2.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "compositing"
@@ -3337,17 +3337,17 @@ dependencies = [
 "checksum cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "393a5f0088efbe41f9d1fcd062f24e83c278608420e62109feb2c8abee07de7d"
 "checksum cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c"
 "checksum cgl 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8bdd78cca65a739cb5475dbf6b6bbb49373e327f4a6f2b499c0f98632df38c10"
 "checksum clang-sys 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "19911f7964ce61a02d382adee8400f919d0fedd53c5441e3d6a9858ba73e249e"
 "checksum clippy_lints 0.0.98 (registry+https://github.com/rust-lang/crates.io-index)" = "4329699b62341fd3ce3ebe13ade6c87d35b8778091e0c2f6da51399e081b9671"
 "checksum cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "dfcf5bcece56ef953b8ea042509e9dcbdfe97820b7e20d86beb53df30ed94978"
 "checksum cocoa 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6d24ed9a15e9c0892cdb20c7acc3e50441501b990ee6dc318c176981829a7941"
 "checksum color_quant 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a475fc4af42d83d28adf72968d9bcfaf035a1a9381642d8e85d8a04957767b0d"
-"checksum compiletest_rs 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "28d60af0dbee4912f00dda79ac3b06d1ca44b641d69359e6f1d4df7c985521d2"
+"checksum compiletest_rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f3f344389765ad7bec166f64c1b39ed6dd2b54d81c4c5dd8af789169351d380c"
 "checksum content-blocker 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1b0d86cb81505503bbfb0d47cf7e12be2e69205a75e70c4da84998e39b96b7f1"
 "checksum cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0e3d6405328b6edb412158b3b7710e2634e23f3614b9bb1c412df7952489a626"
 "checksum core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "20a6d0448d3a99d977ae4a2aa5a98d886a923e863e81ad9ff814645b6feb3bbd"
 "checksum core-foundation-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "05eed248dc504a5391c63794fe4fb64f46f071280afaa1b73308f3c0ce4574c5"
 "checksum core-graphics 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "66e998abb8823fecd2a8a7205429b17a340d447d8c69b3bce86846dcdea3e33b"
 "checksum core-text 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2debbf22a8358e5e270e958b6d65694667be7a2ef9c3a2bf05a0872a3124dc98"
 "checksum crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97"
 "checksum cssparser 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c69c28c9a1a2b98ed625e473c5fa756ba05e3dd4df98661b7eb05dc77ba8a2ad"
--- a/servo/components/plugins/lints/inheritance_integrity.rs
+++ b/servo/components/plugins/lints/inheritance_integrity.rs
@@ -17,17 +17,17 @@ declare_lint!(INHERITANCE_INTEGRITY, Den
 pub struct InheritancePass;
 
 impl LintPass for InheritancePass {
     fn get_lints(&self) -> LintArray {
         lint_array!(INHERITANCE_INTEGRITY)
     }
 }
 
-impl LateLintPass for InheritancePass {
+impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InheritancePass {
     fn check_struct_def(&mut self, cx: &LateContext, def: &hir::VariantData, _n: ast::Name,
                         _gen: &hir::Generics, id: ast::NodeId) {
         // Lints are run post expansion, so it's fine to use
         // #[_dom_struct_marker] here without also checking for #[dom_struct]
         if cx.tcx.has_attr(cx.tcx.map.local_def_id(id), "_dom_struct_marker") {
             // Find the reflector, if any
             let reflector_span = def.fields().iter().enumerate()
                                     .find(|&(ctr, f)| {
--- a/servo/components/plugins/lints/privatize.rs
+++ b/servo/components/plugins/lints/privatize.rs
@@ -16,17 +16,17 @@ declare_lint!(PRIVATIZE, Deny,
 pub struct PrivatizePass;
 
 impl LintPass for PrivatizePass {
     fn get_lints(&self) -> LintArray {
         lint_array!(PRIVATIZE)
     }
 }
 
-impl LateLintPass for PrivatizePass {
+impl<'a, 'tcx> LateLintPass<'a, 'tcx> for PrivatizePass {
     fn check_struct_def(&mut self,
                         cx: &LateContext,
                         def: &hir::VariantData,
                         _n: ast::Name,
                         _gen: &hir::Generics,
                         id: ast::NodeId) {
         if cx.tcx.has_attr(cx.tcx.map.local_def_id(id), "privatize") {
             for field in def.fields() {
--- a/servo/components/plugins/lints/transmute_type.rs
+++ b/servo/components/plugins/lints/transmute_type.rs
@@ -15,17 +15,17 @@ declare_lint!(TRANSMUTE_TYPE_LINT, Allow
 pub struct TransmutePass;
 
 impl LintPass for TransmutePass {
     fn get_lints(&self) -> LintArray {
         lint_array!(TRANSMUTE_TYPE_LINT)
     }
 }
 
-impl LateLintPass for TransmutePass {
+impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TransmutePass {
     fn check_expr(&mut self, cx: &LateContext, ex: &hir::Expr) {
         match ex.node {
             hir::ExprCall(ref expr, ref args) => {
                 match expr.node {
                     hir::ExprPath(hir::QPath::Resolved(_, ref path)) => {
                         if path.segments.last()
                                         .map_or(false, |ref segment| &*segment.name.as_str() == "transmute") &&
                            args.len() == 1 {
--- a/servo/components/plugins/lints/unrooted_must_root.rs
+++ b/servo/components/plugins/lints/unrooted_must_root.rs
@@ -71,17 +71,17 @@ fn is_unrooted_ty(cx: &LateContext, ty: 
 }
 
 impl LintPass for UnrootedPass {
     fn get_lints(&self) -> LintArray {
         lint_array!(UNROOTED_MUST_ROOT)
     }
 }
 
-impl LateLintPass for UnrootedPass {
+impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnrootedPass {
     /// All structs containing #[must_root] types must be #[must_root] themselves
     fn check_struct_def(&mut self,
                         cx: &LateContext,
                         def: &hir::VariantData,
                         _n: ast::Name,
                         _gen: &hir::Generics,
                         id: ast::NodeId) {
         let item = match cx.tcx.map.get(id) {
@@ -114,18 +114,23 @@ impl LateLintPass for UnrootedPass {
                         }
                     }
                 }
                 _ => () // Struct variants already caught by check_struct_def
             }
         }
     }
     /// Function arguments that are #[must_root] types are not allowed
-    fn check_fn(&mut self, cx: &LateContext, kind: visit::FnKind, decl: &hir::FnDecl,
-                body: &hir::Expr, span: codemap::Span, id: ast::NodeId) {
+    fn check_fn(&mut self,
+                cx: &LateContext<'a, 'tcx>,
+                kind: visit::FnKind,
+                decl: &'tcx hir::FnDecl,
+                body: &'tcx hir::Expr,
+                span: codemap::Span,
+                id: ast::NodeId) {
         let in_new_function = match kind {
             visit::FnKind::ItemFn(n, _, _, _, _, _, _) |
             visit::FnKind::Method(n, _, _, _) => {
                 &*n.as_str() == "new" || n.as_str().starts_with("new_")
             }
             visit::FnKind::Closure(_) => return,
         };
 
@@ -154,18 +159,18 @@ impl LateLintPass for UnrootedPass {
     }
 }
 
 struct FnDefVisitor<'a, 'b: 'a, 'tcx: 'a+'b> {
     cx: &'a LateContext<'b, 'tcx>,
     in_new_function: bool,
 }
 
-impl<'a, 'b: 'a, 'tcx: 'a+'b> visit::Visitor<'a> for FnDefVisitor<'a, 'b, 'tcx> {
-    fn visit_expr(&mut self, expr: &'a hir::Expr) {
+impl<'a, 'b, 'tcx> visit::Visitor<'tcx> for FnDefVisitor<'a, 'b, 'tcx> {
+    fn visit_expr(&mut self, expr: &'tcx hir::Expr) {
         let cx = self.cx;
 
         fn require_rooted(cx: &LateContext, in_new_function: bool, subexpr: &hir::Expr) {
             let ty = cx.tcx.tables().expr_ty(&subexpr);
             if is_unrooted_ty(cx, ty, in_new_function) {
                 cx.span_lint(UNROOTED_MUST_ROOT,
                              subexpr.span,
                              &format!("Expression of type {:?} must be rooted", ty))
@@ -189,33 +194,36 @@ impl<'a, 'b: 'a, 'tcx: 'a+'b> visit::Vis
             _ => {
                 // TODO(pcwalton): Check generics with a whitelist of allowed generics.
             }
         }
 
         visit::walk_expr(self, expr);
     }
 
-    fn visit_pat(&mut self, pat: &'a hir::Pat) {
+    fn visit_pat(&mut self, pat: &'tcx hir::Pat) {
         let cx = self.cx;
 
         if let hir::PatKind::Binding(hir::BindingMode::BindByValue(_), _, _, _) = pat.node {
             let ty = cx.tcx.tables().pat_ty(pat);
             if is_unrooted_ty(cx, ty, self.in_new_function) {
                 cx.span_lint(UNROOTED_MUST_ROOT,
                             pat.span,
                             &format!("Expression of type {:?} must be rooted", ty))
             }
         }
 
         visit::walk_pat(self, pat);
     }
 
-    fn visit_fn(&mut self, kind: visit::FnKind<'a>, decl: &'a hir::FnDecl,
-                body: &'a hir::Expr, span: codemap::Span, id: ast::NodeId) {
+    fn visit_fn(&mut self, kind: visit::FnKind<'tcx>, decl: &'tcx hir::FnDecl,
+                body: hir::ExprId, 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, _: &'a hir::ForeignItem) {}
-    fn visit_ty(&mut self, _: &'a 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.map)
+    }
 }
--- a/servo/ports/cef/lib.rs
+++ b/servo/ports/cef/lib.rs
@@ -17,21 +17,21 @@ extern crate log;
 
 extern crate servo;
 extern crate compositing;
 
 extern crate euclid;
 extern crate gfx_traits;
 extern crate gleam;
 extern crate glutin_app;
-extern crate rustc_unicode;
 extern crate script_traits;
 extern crate servo_config;
 extern crate servo_geometry;
 extern crate servo_url;
+extern crate std_unicode;
 extern crate style_traits;
 
 extern crate net_traits;
 extern crate msg;
 
 extern crate libc;
 
 #[cfg(target_os="macos")]
--- a/servo/ports/cef/string_list.rs
+++ b/servo/ports/cef/string_list.rs
@@ -2,17 +2,17 @@
  * 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/. */
 
 use libc::{c_int};
 use std::slice;
 use string::cef_string_utf16_set;
 use types::{cef_string_list_t,cef_string_t};
 
-use rustc_unicode::str::Utf16Encoder;
+use std_unicode::str::Utf16Encoder;
 
 //cef_string_list
 
 #[no_mangle]
 pub extern "C" fn cef_string_list_alloc() -> *mut cef_string_list_t {
     Box::into_raw(box vec!())
 }
 
--- a/servo/ports/cef/window.rs
+++ b/servo/ports/cef/window.rs
@@ -9,17 +9,17 @@
 
 #[cfg(target_os="linux")]
 use core::CEF_APP;
 use eutil::Downcast;
 #[cfg(target_os="linux")]
 use interfaces::CefApp;
 use interfaces::CefBrowser;
 use render_handler::CefRenderHandlerExtensions;
-use rustc_unicode::str::Utf16Encoder;
+use std_unicode::str::Utf16Encoder;
 use types::{cef_cursor_handle_t, cef_cursor_type_t, cef_rect_t};
 use wrappers::CefWrap;
 
 use compositing::compositor_thread::{self, CompositorProxy, CompositorReceiver};
 use compositing::windowing::{WindowEvent, WindowMethods};
 use euclid::point::Point2D;
 use euclid::scale_factor::ScaleFactor;
 use euclid::size::{Size2D, TypedSize2D};
--- a/servo/ports/cef/wrappers.rs
+++ b/servo/ports/cef/wrappers.rs
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use interfaces::{CefV8Value};
 use interfaces::{cef_app_t, CefApp, cef_drag_data_t, cef_post_data_element_t, cef_v8value_t, CefPostDataElement};
 use interfaces::{cef_dialog_handler_t, cef_focus_handler_t};
 use interfaces::{cef_download_handler_t, cef_drag_handler_t, cef_context_menu_handler_t};
 use interfaces::{cef_geolocation_handler_t, cef_jsdialog_handler_t, cef_keyboard_handler_t};
 use interfaces::{cef_load_handler_t, cef_request_handler_t};
-use rustc_unicode::str::Utf16Encoder;
+use std_unicode::str::Utf16Encoder;
 use types::{cef_base_t, cef_browser_settings_t, CefBrowserSettings, cef_color_model_t};
 use types::{cef_context_menu_edit_state_flags_t};
 use types::{cef_context_menu_media_state_flags_t};
 use types::{cef_context_menu_media_type_t, cef_context_menu_type_flags_t, cef_cookie_t, cef_cursor_info_t, CefCursorInfo, cef_cursor_type_t};
 use types::{cef_dom_document_type_t, cef_dom_node_type_t};
 use types::{cef_drag_operations_mask_t, cef_draggable_region_t, cef_duplex_mode_t};
 use types::{cef_errorcode_t, cef_event_flags_t, cef_event_handle_t};
 use types::{cef_file_dialog_mode_t, cef_focus_source_t};
--- a/servo/rust-nightly-date
+++ b/servo/rust-nightly-date
@@ -1,1 +1,1 @@
-2016-11-29
+2016-12-16