diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2015-07-10 22:48:05 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2015-07-15 00:46:43 +0200 |
commit | 83d2a11d860133166ddc22a1551589cfe2476c7f (patch) | |
tree | 84d9be35ebbd99e20a99151b0713ac3351ca77f4 /components/script/dom | |
parent | 64751b8eef5b95de9ac3b9a382b4cb4408cb90c0 (diff) | |
download | servo-83d2a11d860133166ddc22a1551589cfe2476c7f.tar.gz servo-83d2a11d860133166ddc22a1551589cfe2476c7f.zip |
Upgrade to rustc 1.3.0-dev (fddfd089b 2015-07-10)
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/bindings/refcounted.rs | 12 | ||||
-rw-r--r-- | components/script/dom/bindings/trace.rs | 13 | ||||
-rw-r--r-- | components/script/dom/bindings/utils.rs | 1 | ||||
-rw-r--r-- | components/script/dom/xmlhttprequest.rs | 3 |
4 files changed, 23 insertions, 6 deletions
diff --git a/components/script/dom/bindings/refcounted.rs b/components/script/dom/bindings/refcounted.rs index f7e2ba25e10..4e8baee7c0b 100644 --- a/components/script/dom/bindings/refcounted.rs +++ b/components/script/dom/bindings/refcounted.rs @@ -34,11 +34,19 @@ use std::cell::RefCell; use std::collections::hash_map::HashMap; use std::collections::hash_map::Entry::{Vacant, Occupied}; use std::marker::PhantomData; -use std::rc::Rc; use std::sync::{Arc, Mutex}; use core::nonzero::NonZero; -thread_local!(pub static LIVE_REFERENCES: Rc<RefCell<Option<LiveDOMReferences>>> = Rc::new(RefCell::new(None))); + +#[allow(missing_docs)] // FIXME +mod dummy { // Attributes don’t apply through the macro. + use std::rc::Rc; + use std::cell::RefCell; + use super::LiveDOMReferences; + thread_local!(pub static LIVE_REFERENCES: Rc<RefCell<Option<LiveDOMReferences>>> = + Rc::new(RefCell::new(None))); +} +pub use self::dummy::LIVE_REFERENCES; /// A pointer to a Rust DOM object that needs to be destroyed. diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs index 43e9814242e..b03255cd986 100644 --- a/components/script/dom/bindings/trace.rs +++ b/components/script/dom/bindings/trace.rs @@ -359,9 +359,16 @@ pub struct RootedTraceableSet { set: Vec<TraceableInfo> } -/// TLV Holds a set of JSTraceables that need to be rooted -thread_local!(pub static ROOTED_TRACEABLES: Rc<RefCell<RootedTraceableSet>> = - Rc::new(RefCell::new(RootedTraceableSet::new()))); +#[allow(missing_docs)] // FIXME +mod dummy { // Attributes don’t apply through the macro. + use std::rc::Rc; + use std::cell::RefCell; + use super::RootedTraceableSet; + /// TLV Holds a set of JSTraceables that need to be rooted + thread_local!(pub static ROOTED_TRACEABLES: Rc<RefCell<RootedTraceableSet>> = + Rc::new(RefCell::new(RootedTraceableSet::new()))); +} +pub use self::dummy::ROOTED_TRACEABLES; impl RootedTraceableSet { fn new() -> RootedTraceableSet { diff --git a/components/script/dom/bindings/utils.rs b/components/script/dom/bindings/utils.rs index ed20587a206..1f243af768f 100644 --- a/components/script/dom/bindings/utils.rs +++ b/components/script/dom/bindings/utils.rs @@ -820,6 +820,7 @@ unsafe extern "C" fn instance_class_has_proto_at_depth(clasp: *const js::jsapi:: (domclass.dom_class.interface_chain[depth as usize] as u32 == proto_id) as u8 } +#[allow(missing_docs)] // FIXME pub const DOM_CALLBACKS: DOMCallbacks = DOMCallbacks { instanceClassMatchesProto: Some(instance_class_has_proto_at_depth), }; diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs index d849fbdd3ba..823c3eda264 100644 --- a/components/script/dom/xmlhttprequest.rs +++ b/components/script/dom/xmlhttprequest.rs @@ -1038,6 +1038,7 @@ impl<'a> PrivateXMLHttpRequestHelpers for &'a XMLHttpRequest { use std::fmt; use hyper::header::{Header, HeaderFormat}; use hyper::header::SetCookie; + use hyper::error::Result; // a dummy header so we can use headers.remove::<SetCookie2>() #[derive(Clone, Debug)] @@ -1047,7 +1048,7 @@ impl<'a> PrivateXMLHttpRequestHelpers for &'a XMLHttpRequest { "set-cookie2" } - fn parse_header(_: &[Vec<u8>]) -> Option<SetCookie2> { + fn parse_header(_: &[Vec<u8>]) -> Result<SetCookie2> { unimplemented!() } } |