mirror of
https://github.com/servo/servo.git
synced 2025-07-30 10:40:27 +01:00
auto merge of #4739 : Manishearth/servo/warning-patrol, r=Ms2ger
This commit is contained in:
commit
d373f8dc26
34 changed files with 50 additions and 53 deletions
|
@ -10,7 +10,7 @@
|
|||
//! with CORSRequest being expanded into FetchRequest (etc)
|
||||
|
||||
use std::ascii::AsciiExt;
|
||||
use std::fmt::{mod, Show};
|
||||
use std::fmt::{self, Show};
|
||||
use std::str::from_utf8;
|
||||
use time;
|
||||
use time::{now, Timespec};
|
||||
|
|
|
@ -51,7 +51,7 @@ pub struct CallbackInterface {
|
|||
|
||||
/// A common base class for representing IDL callback function and
|
||||
/// callback interface types.
|
||||
#[allow(raw_pointer_deriving)]
|
||||
#[allow(raw_pointer_derive)]
|
||||
#[derive(Copy, Clone,PartialEq)]
|
||||
#[jstraceable]
|
||||
struct CallbackObject {
|
||||
|
|
|
@ -175,10 +175,9 @@ impl<T: Reflectable> JS<T> {
|
|||
}
|
||||
}
|
||||
|
||||
#[old_impl_check]
|
||||
impl<T: Assignable<U>, U: Reflectable> JS<U> {
|
||||
impl<U: Reflectable> JS<U> {
|
||||
/// Create a `JS<T>` from any JS-managed pointer.
|
||||
pub fn from_rooted(root: T) -> JS<U> {
|
||||
pub fn from_rooted<T: Assignable<U>>(root: T) -> JS<U> {
|
||||
unsafe {
|
||||
root.get_js()
|
||||
}
|
||||
|
@ -246,10 +245,9 @@ pub struct MutNullableJS<T: Reflectable> {
|
|||
ptr: Cell<Option<JS<T>>>
|
||||
}
|
||||
|
||||
#[old_impl_check]
|
||||
impl<T: Assignable<U>, U: Reflectable> MutNullableJS<U> {
|
||||
impl<U: Reflectable> MutNullableJS<U> {
|
||||
/// Create a new `MutNullableJS`
|
||||
pub fn new(initial: Option<T>) -> MutNullableJS<U> {
|
||||
pub fn new<T: Assignable<U>>(initial: Option<T>) -> MutNullableJS<U> {
|
||||
MutNullableJS {
|
||||
ptr: Cell::new(initial.map(|initial| {
|
||||
unsafe { initial.get_js() }
|
||||
|
@ -326,16 +324,15 @@ impl<T: Reflectable> JS<T> {
|
|||
}
|
||||
}
|
||||
|
||||
#[old_impl_check]
|
||||
impl<From, To> JS<From> {
|
||||
impl<From> JS<From> {
|
||||
/// Return `self` as a `JS` of another type.
|
||||
//XXXjdm It would be lovely if this could be private.
|
||||
pub unsafe fn transmute(self) -> JS<To> {
|
||||
pub unsafe fn transmute<To>(self) -> JS<To> {
|
||||
mem::transmute(self)
|
||||
}
|
||||
|
||||
/// Return `self` as a `JS` of another type.
|
||||
pub unsafe fn transmute_copy(&self) -> JS<To> {
|
||||
pub unsafe fn transmute_copy<To>(&self) -> JS<To> {
|
||||
mem::transmute_copy(self)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ use js;
|
|||
/// Proxy handler for a WindowProxy.
|
||||
pub struct WindowProxyHandler(pub *const libc::c_void);
|
||||
|
||||
#[allow(raw_pointer_deriving)]
|
||||
#[allow(raw_pointer_derive)]
|
||||
#[jstraceable]
|
||||
/// Static data associated with a global object.
|
||||
pub struct GlobalStaticData {
|
||||
|
@ -352,7 +352,7 @@ pub fn reflect_dom_object<T: Reflectable>
|
|||
|
||||
/// A struct to store a reference to the reflector of a DOM object.
|
||||
// Allowing unused_attribute because the lint sometimes doesn't run in order
|
||||
#[allow(raw_pointer_deriving, unrooted_must_root, unused_attributes)]
|
||||
#[allow(raw_pointer_derive, unrooted_must_root, unused_attributes)]
|
||||
#[derive(PartialEq)]
|
||||
#[must_root]
|
||||
#[servo_lang = "reflector"]
|
||||
|
|
|
@ -26,7 +26,7 @@ use js::{JSRESOLVE_QUALIFIED, JSRESOLVE_ASSIGNING};
|
|||
|
||||
use std::ptr;
|
||||
|
||||
#[allow(raw_pointer_deriving)]
|
||||
#[allow(raw_pointer_derive)]
|
||||
#[jstraceable]
|
||||
#[privatize]
|
||||
pub struct BrowserContext {
|
||||
|
|
|
@ -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/. */
|
||||
|
||||
use dom::bindings::codegen::Bindings::CSSStyleDeclarationBinding::{mod, CSSStyleDeclarationMethods};
|
||||
use dom::bindings::codegen::Bindings::CSSStyleDeclarationBinding::{self, CSSStyleDeclarationMethods};
|
||||
use dom::bindings::codegen::InheritTypes::{NodeCast, ElementCast};
|
||||
use dom::bindings::error::Error;
|
||||
use dom::bindings::error::ErrorResult;
|
||||
|
|
|
@ -50,7 +50,7 @@ use dom::node::{window_from_node};
|
|||
use dom::nodelist::NodeList;
|
||||
use dom::virtualmethods::{VirtualMethods, vtable_for};
|
||||
use devtools_traits::AttrInfo;
|
||||
use style::{mod, SimpleColorAttribute, UnsignedIntegerAttribute};
|
||||
use style::{self, SimpleColorAttribute, UnsignedIntegerAttribute};
|
||||
use style::{IntegerAttribute, LengthAttribute, matches};
|
||||
use servo_util::namespace;
|
||||
use servo_util::str::{DOMString, LengthOrPercentageOrAuto};
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use dom::attr::{Attr, AttrHelpers};
|
||||
use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
|
||||
use dom::bindings::codegen::Bindings::HTMLBodyElementBinding::{mod, HTMLBodyElementMethods};
|
||||
use dom::bindings::codegen::Bindings::HTMLBodyElementBinding::{self, HTMLBodyElementMethods};
|
||||
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
||||
use dom::bindings::codegen::InheritTypes::EventTargetCast;
|
||||
use dom::bindings::codegen::InheritTypes::{HTMLBodyElementDerived, HTMLElementCast};
|
||||
|
@ -18,7 +18,7 @@ use dom::node::{Node, NodeTypeId, window_from_node};
|
|||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use cssparser::RGBA;
|
||||
use servo_util::str::{mod, DOMString};
|
||||
use servo_util::str::{self, DOMString};
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::Cell;
|
||||
|
|
|
@ -13,7 +13,7 @@ use dom::node::NodeTypeId;
|
|||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use cssparser::RGBA;
|
||||
use servo_util::str::{mod, DOMString, LengthOrPercentageOrAuto};
|
||||
use servo_util::str::{self, DOMString, LengthOrPercentageOrAuto};
|
||||
use std::cell::Cell;
|
||||
|
||||
#[derive(Copy, PartialEq, Show)]
|
||||
|
|
|
@ -18,7 +18,7 @@ use dom::node::{Node, NodeHelpers, NodeTypeId};
|
|||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use cssparser::RGBA;
|
||||
use servo_util::str::{mod, DOMString, LengthOrPercentageOrAuto};
|
||||
use servo_util::str::{self, DOMString, LengthOrPercentageOrAuto};
|
||||
use std::cell::Cell;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -14,7 +14,7 @@ use dom::node::{Node, NodeTypeId};
|
|||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use cssparser::RGBA;
|
||||
use servo_util::str::{mod, DOMString};
|
||||
use servo_util::str::{self, DOMString};
|
||||
use std::cell::Cell;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -14,7 +14,7 @@ use dom::node::{Node, NodeTypeId};
|
|||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use cssparser::RGBA;
|
||||
use servo_util::str::{mod, DOMString};
|
||||
use servo_util::str::{self, DOMString};
|
||||
use std::cell::Cell;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -60,7 +60,7 @@ use std::cell::{Cell, RefCell, Ref, RefMut};
|
|||
use std::default::Default;
|
||||
use std::iter::{FilterMap, Peekable};
|
||||
use std::mem;
|
||||
use style::{mod, ComputedValues};
|
||||
use style::{self, ComputedValues};
|
||||
use std::sync::Arc;
|
||||
use uuid;
|
||||
use string_cache::QualName;
|
||||
|
@ -2206,7 +2206,7 @@ impl<'a> NodeMethods for JSRef<'a, Node> {
|
|||
/// The address of a node known to be valid. These are sent from script to layout,
|
||||
/// and are also used in the HTML parser interface.
|
||||
|
||||
#[allow(raw_pointer_deriving)]
|
||||
#[allow(raw_pointer_derive)]
|
||||
#[derive(Clone, PartialEq, Eq, Copy)]
|
||||
pub struct TrustedNodeAddress(pub *const c_void);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ use hyper::header::Headers;
|
|||
use hyper::header::common::{Accept, ContentLength, ContentType};
|
||||
use hyper::header::quality_item::QualityItem;
|
||||
use hyper::http::RawStatus;
|
||||
use hyper::mime::{mod, Mime};
|
||||
use hyper::mime::{self, Mime};
|
||||
use hyper::method::Method;
|
||||
|
||||
use js::jsapi::{JS_ParseJSON, JSContext};
|
||||
|
|
|
@ -30,7 +30,7 @@ use dom::eventtarget::{EventTarget, EventTargetHelpers};
|
|||
use dom::htmlelement::HTMLElementTypeId;
|
||||
use dom::keyboardevent::KeyboardEvent;
|
||||
use dom::mouseevent::MouseEvent;
|
||||
use dom::node::{mod, Node, NodeHelpers, NodeDamage, NodeTypeId};
|
||||
use dom::node::{self, Node, NodeHelpers, NodeDamage, NodeTypeId};
|
||||
use dom::window::{Window, WindowHelpers, ScriptHelpers};
|
||||
use parse::html::{HTMLInput, parse_html};
|
||||
use layout_interface::{ScriptLayoutChan, LayoutChan, ReflowGoal, ReflowQueryType};
|
||||
|
@ -81,7 +81,7 @@ use libc;
|
|||
use std::any::Any;
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::Cell;
|
||||
use std::fmt::{mod, Show};
|
||||
use std::fmt::{self, Show};
|
||||
use std::mem::replace;
|
||||
use std::num::ToPrimitive;
|
||||
use std::rc::Rc;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue