servo: Merge #4756 - Fix various build warnings (from Ms2ger:warnings); r=mbrubeck
authorMs2ger <ms2ger@gmail.com>
Wed, 28 Jan 2015 13:15:53 -0700
changeset 382289 c025457a0857e44486e24bcae5e71ef3b2e16d81
parent 382288 37c1be5d3c9edab7c47c500c6dfdda30c5d1c103
child 382290 b26d33224470c801d0abe1e5b9f7a19c5b86f888
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)
reviewersmbrubeck
servo: Merge #4756 - Fix various build warnings (from Ms2ger:warnings); r=mbrubeck Source-Repo: https://github.com/servo/servo Source-Revision: 88b781421aa78a2f466e6d170f89d13a870643cd
servo/components/canvas/lib.rs
servo/components/devtools_traits/lib.rs
servo/components/layout/layout_debug.rs
servo/components/msg/lib.rs
servo/components/script/lib.rs
servo/components/script_traits/lib.rs
servo/components/servo/lib.rs
servo/components/servo/main.rs
servo/components/util/workqueue.rs
servo/ports/cef/browser_host.rs
servo/ports/cef/eutil.rs
servo/ports/cef/macros.rs
servo/ports/cef/string.rs
servo/ports/cef/v8.rs
servo/ports/cef/window.rs
servo/ports/cef/wrappers.rs
servo/ports/glfw/window.rs
servo/ports/glutin/lib.rs
servo/ports/glutin/window.rs
servo/ports/gonk/src/window.rs
--- a/servo/components/canvas/lib.rs
+++ b/servo/components/canvas/lib.rs
@@ -1,13 +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/. */
 
 #![deny(unused_imports)]
 #![deny(unused_variables)]
 #![allow(missing_copy_implementations)]
+#![allow(unstable)]
 
 extern crate azure;
 extern crate geom;
 extern crate "util" as servo_util;
 
 pub mod canvas_paint_task;
--- a/servo/components/devtools_traits/lib.rs
+++ b/servo/components/devtools_traits/lib.rs
@@ -8,16 +8,17 @@
 
 #![crate_name = "devtools_traits"]
 #![crate_type = "rlib"]
 
 #![feature(int_uint)]
 
 #![allow(non_snake_case)]
 #![allow(missing_copy_implementations)]
+#![allow(unstable)]
 
 extern crate "msg" as servo_msg;
 extern crate serialize;
 extern crate url;
 extern crate "util" as servo_util;
 
 pub use self::DevtoolsControlMsg::*;
 pub use self::DevtoolScriptControlMsg::*;
--- a/servo/components/layout/layout_debug.rs
+++ b/servo/components/layout/layout_debug.rs
@@ -1,16 +1,16 @@
 /* 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/. */
 
 //! Supports writing a trace file created during each layout scope
 //! that can be viewed by an external tool to make layout debugging easier.
 
-#![macro_escape]
+#![macro_use]
 
 use flow_ref::FlowRef;
 use flow;
 use serialize::json;
 
 use std::borrow::ToOwned;
 use std::cell::RefCell;
 use std::io::File;
--- a/servo/components/msg/lib.rs
+++ b/servo/components/msg/lib.rs
@@ -2,16 +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/. */
 
 #![feature(int_uint)]
 
 #![deny(unused_imports)]
 #![deny(unused_variables)]
 #![allow(missing_copy_implementations)]
+#![allow(unstable)]
 
 extern crate azure;
 extern crate geom;
 extern crate hyper;
 extern crate layers;
 extern crate serialize;
 extern crate "util" as servo_util;
 extern crate url;
--- a/servo/components/script/lib.rs
+++ b/servo/components/script/lib.rs
@@ -44,19 +44,19 @@ extern crate url;
 extern crate uuid;
 extern crate string_cache;
 #[no_link] #[macro_use] #[plugin]
 extern crate string_cache_macros;
 
 pub mod cors;
 
 /// The implementation of the DOM.
-#[macro_escape]
+#[macro_use]
 pub mod dom {
-    #[macro_escape]
+    #[macro_use]
     pub mod macros;
 
     /// The code to expose the DOM to JavaScript through IDL bindings.
     #[allow(unsafe_blocks)]
     #[deny(missing_docs)]
     pub mod bindings {
         pub mod cell;
         pub mod global;
--- a/servo/components/script_traits/lib.rs
+++ b/servo/components/script_traits/lib.rs
@@ -2,16 +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/. */
 
 #![feature(int_uint)]
 
 #![deny(unused_imports)]
 #![deny(unused_variables)]
 #![allow(missing_copy_implementations)]
+#![allow(unstable)]
 
 extern crate devtools_traits;
 extern crate geom;
 extern crate libc;
 extern crate "msg" as servo_msg;
 extern crate "net" as servo_net;
 extern crate "util" as servo_util;
 extern crate url;
--- a/servo/components/servo/lib.rs
+++ b/servo/components/servo/lib.rs
@@ -2,16 +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/. */
 
 #![feature(thread_local)]
 
 #![deny(unused_imports)]
 #![deny(unused_variables)]
 #![allow(missing_copy_implementations)]
+#![allow(unstable)]
 
 #[macro_use]
 extern crate log;
 
 extern crate compositing;
 extern crate devtools;
 extern crate "net" as servo_net;
 extern crate "msg" as servo_msg;
--- a/servo/components/servo/main.rs
+++ b/servo/components/servo/main.rs
@@ -1,14 +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(unused_imports)]
 #![deny(unused_variables)]
+#![allow(unstable)]
 
 #[cfg(target_os="android")]
 extern crate libc;
 
 extern crate servo;
 extern crate time;
 extern crate "util" as servo_util;
 
--- a/servo/components/util/workqueue.rs
+++ b/servo/components/util/workqueue.rs
@@ -190,17 +190,17 @@ impl<'a, QueueData: 'static, WorkData: S
         unsafe {
             drop((*self.ref_count).fetch_add(1, Ordering::SeqCst));
         }
         self.worker.push(work_unit);
     }
 
     /// Retrieves the queue user data.
     #[inline]
-    pub fn user_data<'a>(&'a self) -> &'a QueueData {
+    pub fn user_data<'b>(&'b self) -> &'b QueueData {
         unsafe {
             mem::transmute(self.queue_data)
         }
     }
 }
 
 /// A work queue on which units of work can be submitted.
 pub struct WorkQueue<QueueData: 'static, WorkData: 'static> {
--- a/servo/ports/cef/browser_host.rs
+++ b/servo/ports/cef/browser_host.rs
@@ -1,23 +1,23 @@
 /* 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/. */
 
 use eutil::Downcast;
 use interfaces::{CefBrowser, CefBrowserHost, CefClient, cef_browser_host_t, cef_client_t};
 use types::{cef_mouse_button_type_t, cef_mouse_event, cef_rect_t, cef_key_event};
 use types::cef_key_event_type_t::{KEYEVENT_CHAR, KEYEVENT_KEYDOWN, KEYEVENT_KEYUP, KEYEVENT_RAWKEYDOWN};
-use browser::{mod, ServoCefBrowserExtensions};
+use browser::{self, ServoCefBrowserExtensions};
 
 use compositing::windowing::{WindowEvent, MouseWindowEvent};
 use geom::point::TypedPoint2D;
 use geom::size::TypedSize2D;
 use libc::{c_double, c_int};
-use servo_msg::constellation_msg::{mod, KeyModifiers, KeyState};
+use servo_msg::constellation_msg::{self, KeyModifiers, KeyState};
 use std::cell::RefCell;
 
 pub struct ServoCefBrowserHost {
     /// A reference to the browser.
     pub browser: RefCell<Option<CefBrowser>>,
     /// A reference to the client.
     pub client: CefClient,
 }
--- a/servo/ports/cef/eutil.rs
+++ b/servo/ports/cef/eutil.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/. */
 
 use types::cef_base_t;
 
-use libc::{mod, c_int, c_void, size_t};
+use libc::{self, c_int, c_void, size_t};
 use std::mem;
 use std::slice;
 use std::str;
 
 /// Allows you to downcast a CEF interface to a CEF class instance.
 ///
 /// FIXME(pcwalton): This is currently unsafe. I think the right way to make this safe is to (a)
 /// forbid more than one Rust implementation of a given interface (easy to do by manufacturing an
--- a/servo/ports/cef/macros.rs
+++ b/servo/ports/cef/macros.rs
@@ -1,13 +1,13 @@
 /* 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/. */
 
-#![macro_escape]
+#![macro_use]
 
 // Provides the implementation of a CEF class. An example follows:
 //
 //    struct ServoCefThing {
 //        ...
 //    }
 //
 //    cef_class_impl! {
--- a/servo/ports/cef/string.rs
+++ b/servo/ports/cef/string.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/. */
 
 
 use eutil::slice_to_str;
-use libc::{mod, size_t, c_int, c_ushort, c_void};
+use libc::{self, size_t, c_int, c_ushort, c_void};
 use libc::types::os::arch::c95::wchar_t;
 use std::char;
 use std::cmp::Ordering;
 use std::mem;
 use std::ptr;
 use std::slice;
 use std::string;
 use types::{cef_string_utf16_t, cef_string_utf8_t, cef_string_wide_t};
--- a/servo/ports/cef/v8.rs
+++ b/servo/ports/cef/v8.rs
@@ -1,17 +1,17 @@
 /* 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/. */
 
 use interfaces::{cef_v8accessor_t, cef_v8context_t, cef_v8handler_t, cef_v8stack_trace_t};
 use interfaces::{cef_v8value_t};
 use types::{cef_string_t, cef_time_t};
 
-use libc::{mod, c_double, c_int};
+use libc::{self, c_double, c_int};
 
 cef_stub_static_method_impls! {
     fn cef_v8context_get_current_context() -> *mut cef_v8context_t
     fn cef_v8context_get_entered_context() -> *mut cef_v8context_t
     fn cef_v8context_in_context() -> libc::c_int
     fn cef_v8value_create_undefined() -> *mut cef_v8value_t
     fn cef_v8value_create_null() -> *mut cef_v8value_t
     fn cef_v8value_create_bool(_value: c_int) -> *mut cef_v8value_t
--- a/servo/ports/cef/window.rs
+++ b/servo/ports/cef/window.rs
@@ -8,17 +8,17 @@
 //! are managed by a platform toolkit (GLFW or Glutin).
 
 use eutil::Downcast;
 use interfaces::CefBrowser;
 use render_handler::CefRenderHandlerExtensions;
 use types::{cef_cursor_handle_t, cef_rect_t};
 use wrappers::Utf16Encoder;
 
-use compositing::compositor_task::{mod, CompositorProxy, CompositorReceiver};
+use compositing::compositor_task::{self, CompositorProxy, CompositorReceiver};
 use compositing::windowing::{WindowEvent, WindowMethods};
 use geom::scale_factor::ScaleFactor;
 use geom::size::TypedSize2D;
 use gleam::gl;
 use layers::geometry::DevicePixel;
 use layers::platform::surface::NativeGraphicsMetadata;
 use libc::{c_char, c_void};
 use servo_msg::constellation_msg::{Key, KeyModifiers};
--- a/servo/ports/cef/wrappers.rs
+++ b/servo/ports/cef/wrappers.rs
@@ -25,17 +25,17 @@ use types::{cef_rect_t, cef_request_hand
 use types::{cef_resource_type_t};
 use types::{cef_screen_info_t, cef_size_t, cef_string_t, cef_string_userfree_t};
 use types::{cef_string_list_t, cef_string_map_t, cef_string_multimap_t, cef_string_utf16};
 use types::{cef_termination_status_t, cef_text_input_context_t, cef_thread_id_t};
 use types::{cef_time_t, cef_transition_type_t, cef_urlrequest_status_t};
 use types::{cef_v8_accesscontrol_t, cef_v8_propertyattribute_t, cef_value_type_t};
 use types::{cef_window_info_t, cef_xml_encoding_type_t, cef_xml_node_type_t};
 
-use libc::{mod, c_char, c_int, c_ushort, c_void};
+use libc::{self, c_char, c_int, c_ushort, c_void};
 use std::collections::HashMap;
 use std::mem;
 use std::ptr;
 
 pub trait CefWrap<CObject> {
     fn to_c(rust_object: Self) -> CObject;
     unsafe fn to_rust(c_object: CObject) -> Self;
 }
--- a/servo/ports/glfw/window.rs
+++ b/servo/ports/glfw/window.rs
@@ -1,36 +1,36 @@
 /* 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/. */
 
 //! A windowing implementation using GLFW.
 
 use NestedEventLoopListener;
 
-use compositing::compositor_task::{mod, CompositorProxy, CompositorReceiver};
+use compositing::compositor_task::{self, CompositorProxy, CompositorReceiver};
 use compositing::windowing::WindowNavigateMsg;
 use compositing::windowing::{MouseWindowEvent, WindowEvent, WindowMethods};
 use geom::point::{Point2D, TypedPoint2D};
 use geom::scale_factor::ScaleFactor;
 use geom::size::TypedSize2D;
-use glfw::{mod, Context};
+use glfw::{self, Context};
 use gleam::gl;
 use layers::geometry::DevicePixel;
 use layers::platform::surface::NativeGraphicsMetadata;
 use libc::c_int;
 use msg::compositor_msg::{PaintState, ReadyState};
 use msg::constellation_msg::{KeyState, LoadData};
 use msg::constellation_msg::{Key, KeyModifiers};
 use msg::constellation_msg::{SHIFT, ALT, CONTROL, SUPER};
 use std::cell::{Cell, RefCell};
 use std::comm::Receiver;
 use std::num::Float;
 use std::rc::Rc;
-use time::{mod, Timespec};
+use time::{self, Timespec};
 use util::cursor::Cursor;
 use util::geometry::ScreenPx;
 
 /// The type of a window.
 pub struct Window {
     glfw: glfw::Glfw,
 
     glfw_window: glfw::Window,
--- a/servo/ports/glutin/lib.rs
+++ b/servo/ports/glutin/lib.rs
@@ -1,16 +1,17 @@
 /* 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/. */
 
 //! A simple application that uses GLFW to open a window for Servo to display in.
 
 #![feature(box_syntax, int_uint)]
 #![deny(unused_imports, unused_variables)]
+#![allow(unstable)]
 
 #[cfg(target_os="macos")]
 extern crate cgl;
 extern crate compositing;
 extern crate geom;
 extern crate gleam;
 extern crate glutin;
 extern crate layers;
--- a/servo/ports/glutin/window.rs
+++ b/servo/ports/glutin/window.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/. */
 
 //! A windowing implementation using glutin.
 
-use compositing::compositor_task::{mod, CompositorProxy, CompositorReceiver};
+use compositing::compositor_task::{self, CompositorProxy, CompositorReceiver};
 use compositing::windowing::{WindowEvent, WindowMethods};
 use geom::scale_factor::ScaleFactor;
 use geom::size::TypedSize2D;
 use gleam::gl;
 use glutin;
 use layers::geometry::DevicePixel;
 use layers::platform::surface::NativeGraphicsMetadata;
 use msg::constellation_msg;
@@ -30,17 +30,17 @@ use geom::point::{Point2D, TypedPoint2D}
 use glutin::{ElementState, Event, MouseButton, VirtualKeyCode};
 #[cfg(feature = "window")]
 use msg::constellation_msg::{KeyState, CONTROL, SHIFT, ALT};
 #[cfg(feature = "window")]
 use std::cell::{Cell, RefCell};
 #[cfg(feature = "window")]
 use std::num::Float;
 #[cfg(feature = "window")]
-use time::{mod, Timespec};
+use time::{self, Timespec};
 #[cfg(feature = "window")]
 use util::opts;
 
 #[cfg(all(feature = "headless", target_os="linux"))]
 use std::ptr;
 
 #[cfg(feature = "window")]
 static mut g_nested_event_loop_listener: Option<*mut (NestedEventLoopListener + 'static)> = None;
--- a/servo/ports/gonk/src/window.rs
+++ b/servo/ports/gonk/src/window.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/. */
 
 //! A windowing implementation using gonk interfaces.
 
-use compositing::compositor_task::{mod, CompositorProxy, CompositorReceiver};
+use compositing::compositor_task::{self, CompositorProxy, CompositorReceiver};
 use compositing::windowing::{WindowEvent, WindowMethods};
 use geom::scale_factor::ScaleFactor;
 use geom::size::TypedSize2D;
 use layers::geometry::DevicePixel;
 use layers::platform::surface::NativeGraphicsMetadata;
 use libc::c_int;
 use msg::compositor_msg::{ReadyState, PaintState};
 use msg::constellation_msg::{Key, KeyModifiers};