diff options
-rw-r--r-- | components/plugins/lints/inheritance_integrity.rs | 26 | ||||
-rw-r--r-- | components/plugins/utils.rs | 12 | ||||
-rw-r--r-- | components/script/dom/bindings/trace.rs | 6 | ||||
-rw-r--r-- | components/servo/Cargo.lock | 26 | ||||
-rw-r--r-- | components/util/mem.rs | 6 | ||||
-rw-r--r-- | ports/cef/Cargo.lock | 26 | ||||
-rw-r--r-- | ports/geckolib/Cargo.lock | 24 | ||||
-rw-r--r-- | ports/gonk/Cargo.lock | 26 | ||||
-rw-r--r-- | rust-nightly-date | 2 |
9 files changed, 81 insertions, 73 deletions
diff --git a/components/plugins/lints/inheritance_integrity.rs b/components/plugins/lints/inheritance_integrity.rs index 8ced4fb4c69..fc70920d50e 100644 --- a/components/plugins/lints/inheritance_integrity.rs +++ b/components/plugins/lints/inheritance_integrity.rs @@ -46,9 +46,12 @@ impl LateLintPass for InheritancePass { // Find all #[dom_struct] fields let dom_spans: Vec<_> = def.fields().iter().enumerate().filter_map(|(ctr, f)| { if let hir::TyPath(..) = f.node.ty.node { - if let Some(&def::PathResolution { base_def: def::DefTy(def_id, _), .. }) = + if let Some(&def::PathResolution { base_def: def, .. }) = cx.tcx.def_map.borrow().get(&f.node.ty.id) { - if cx.tcx.has_attr(def_id, "_dom_struct_marker") { + if let def::Def::PrimTy(_) = def { + return None; + } + if cx.tcx.has_attr(def.def_id(), "_dom_struct_marker") { // If the field is not the first, it's probably // being misused (a) if ctr > 0 { @@ -66,23 +69,26 @@ impl LateLintPass for InheritancePass { // We should not have both a reflector and a dom struct field if let Some(sp) = reflector_span { if dom_spans.len() > 0 { - cx.span_lint(INHERITANCE_INTEGRITY, cx.tcx.map.expect_item(id).span, - "This DOM struct has both Reflector and bare DOM struct members"); + let mut db = cx.struct_span_lint(INHERITANCE_INTEGRITY, + cx.tcx.map.expect_item(id).span, + "This DOM struct has both Reflector \ + and bare DOM struct members"); if cx.current_level(INHERITANCE_INTEGRITY) != Level::Allow { - let sess = cx.sess(); - sess.span_note(sp, "Reflector found here"); + db.span_note(sp, "Reflector found here"); for span in &dom_spans { - sess.span_note(*span, "Bare DOM struct found here"); + db.span_note(*span, "Bare DOM struct found here"); } } } // Nor should we have more than one dom struct field } else if dom_spans.len() > 1 { - cx.span_lint(INHERITANCE_INTEGRITY, cx.tcx.map.expect_item(id).span, - "This DOM struct has multiple DOM struct members, only one is allowed"); + let mut db = cx.struct_span_lint(INHERITANCE_INTEGRITY, + cx.tcx.map.expect_item(id).span, + "This DOM struct has multiple \ + DOM struct members, only one is allowed"); if cx.current_level(INHERITANCE_INTEGRITY) != Level::Allow { for span in &dom_spans { - cx.sess().span_note(*span, "Bare DOM struct found here"); + db.span_note(*span, "Bare DOM struct found here"); } } } else if dom_spans.is_empty() { diff --git a/components/plugins/utils.rs b/components/plugins/utils.rs index 8c97842bc15..e7f9d6df930 100644 --- a/components/plugins/utils.rs +++ b/components/plugins/utils.rs @@ -25,7 +25,7 @@ pub fn match_ty_unwrap<'a>(ty: &'a ast::Ty, segments: &[&str]) -> Option<&'a [P< // which will compare them in reverse until one of them runs out of segments if seg.iter().rev().zip(segments.iter().rev()).all(|(a, b)| a.identifier.name.as_str() == *b) { match seg.last() { - Some(&ast::PathSegment { parameters: ast::AngleBracketedParameters(ref a), .. }) => { + Some(&ast::PathSegment { parameters: ast::PathParameters::AngleBracketed(ref a), .. }) => { Some(&a.types) } _ => None @@ -45,12 +45,16 @@ pub fn match_lang_ty(cx: &LateContext, ty: &hir::Ty, value: &str) -> bool { _ => return false, } - let def_id = match cx.tcx.def_map.borrow().get(&ty.id) { - Some(&def::PathResolution { base_def: def::DefTy(def_id, _), .. }) => def_id, + let def = match cx.tcx.def_map.borrow().get(&ty.id) { + Some(&def::PathResolution { base_def: def, .. }) => def, _ => return false, }; - match_lang_did(cx, def_id, value) + if let def::Def::PrimTy(_) = def { + return false; + } + + match_lang_did(cx, def.def_id(), value) } pub fn match_lang_did(cx: &LateContext, did: DefId, value: &str) -> bool { diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs index dec38c26565..e62bd5d9583 100644 --- a/components/script/dom/bindings/trace.rs +++ b/components/script/dom/bindings/trace.rs @@ -71,10 +71,9 @@ use serde::{Deserialize, Serialize}; use smallvec::SmallVec; use std::boxed::FnBox; use std::cell::{Cell, UnsafeCell}; -use std::collections::hash_state::HashState; use std::collections::{HashMap, HashSet}; use std::ffi::CString; -use std::hash::{Hash, Hasher}; +use std::hash::{BuildHasher, Hash}; use std::intrinsics::return_address; use std::iter::{FromIterator, IntoIterator}; use std::mem; @@ -235,8 +234,7 @@ impl<T: JSTraceable, U: JSTraceable> JSTraceable for Result<T, U> { impl<K, V, S> JSTraceable for HashMap<K, V, S> where K: Hash + Eq + JSTraceable, V: JSTraceable, - S: HashState, - <S as HashState>::Hasher: Hasher, + S: BuildHasher { #[inline] fn trace(&self, trc: *mut JSTracer) { diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index fe810d3d674..9ef0a1325b7 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -85,7 +85,7 @@ dependencies = [ [[package]] name = "aster" -version = "0.9.2" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -584,7 +584,7 @@ dependencies = [ [[package]] name = "gaol" version = "0.0.1" -source = "git+https://github.com/servo/gaol#e1349d8d3d933b3a90f9c86baa390261c510e019" +source = "git+https://github.com/servo/gaol#491dba122d6741ea4e56c754505a69f6319d41e3" dependencies = [ "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1434,23 +1434,23 @@ dependencies = [ [[package]] name = "quasi" -version = "0.3.10" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "quasi_codegen" -version = "0.3.10" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aster 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "aster 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "quasi_macros" -version = "0.3.9" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quasi_codegen 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", + "quasi_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1601,12 +1601,12 @@ dependencies = [ [[package]] name = "serde_codegen" -version = "0.6.6" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aster 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "quasi 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", - "quasi_macros 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aster 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quasi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quasi_macros 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1623,7 +1623,7 @@ name = "serde_macros" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde_codegen 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_codegen 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1857,7 +1857,7 @@ dependencies = [ [[package]] name = "tenacious" version = "0.0.15" -source = "git+https://github.com/Manishearth/rust-tenacious#3eaa89911cf32b09b869fcc4e998be535e4f8c8d" +source = "git+https://github.com/Manishearth/rust-tenacious#ea664e2dfe6f0a1a108ab5369b4271d8473eca47" [[package]] name = "tendril" diff --git a/components/util/mem.rs b/components/util/mem.rs index bc7fe82663c..6bfd910096a 100644 --- a/components/util/mem.rs +++ b/components/util/mem.rs @@ -19,8 +19,8 @@ use range::Range; use selectors::parser::{Combinator, CompoundSelector, PseudoElement, Selector, SimpleSelector}; use selectors::states::ElementState; use std::cell::{Cell, RefCell}; -use std::collections::{HashMap, LinkedList, hash_state}; -use std::hash::Hash; +use std::collections::{HashMap, LinkedList}; +use std::hash::{BuildHasher, Hash}; use std::mem::{size_of, transmute}; use std::rc::Rc; use std::result::Result; @@ -194,7 +194,7 @@ impl<T> HeapSizeOf for Vec<Rc<T>> { } impl<K: HeapSizeOf, V: HeapSizeOf, S> HeapSizeOf for HashMap<K, V, S> - where K: Eq + Hash, S: hash_state::HashState { + where K: Eq + Hash, S: BuildHasher { fn heap_size_of_children(&self) -> usize { //TODO(#6908) measure actual bucket memory usage instead of approximating let size = self.capacity() * (size_of::<V>() + size_of::<K>()); diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index aebba34aa5f..3f425f85082 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -75,7 +75,7 @@ dependencies = [ [[package]] name = "aster" -version = "0.9.2" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -552,7 +552,7 @@ dependencies = [ [[package]] name = "gaol" version = "0.0.1" -source = "git+https://github.com/servo/gaol#e1349d8d3d933b3a90f9c86baa390261c510e019" +source = "git+https://github.com/servo/gaol#491dba122d6741ea4e56c754505a69f6319d41e3" dependencies = [ "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1358,23 +1358,23 @@ dependencies = [ [[package]] name = "quasi" -version = "0.3.10" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "quasi_codegen" -version = "0.3.10" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aster 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "aster 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "quasi_macros" -version = "0.3.9" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quasi_codegen 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", + "quasi_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1516,12 +1516,12 @@ dependencies = [ [[package]] name = "serde_codegen" -version = "0.6.6" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aster 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "quasi 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", - "quasi_macros 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aster 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quasi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quasi_macros 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1538,7 +1538,7 @@ name = "serde_macros" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde_codegen 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_codegen 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1790,7 +1790,7 @@ dependencies = [ [[package]] name = "tenacious" version = "0.0.15" -source = "git+https://github.com/Manishearth/rust-tenacious#3eaa89911cf32b09b869fcc4e998be535e4f8c8d" +source = "git+https://github.com/Manishearth/rust-tenacious#ea664e2dfe6f0a1a108ab5369b4271d8473eca47" [[package]] name = "tendril" diff --git a/ports/geckolib/Cargo.lock b/ports/geckolib/Cargo.lock index e17018b4220..4d14ca52c30 100644 --- a/ports/geckolib/Cargo.lock +++ b/ports/geckolib/Cargo.lock @@ -39,7 +39,7 @@ dependencies = [ [[package]] name = "aster" -version = "0.9.2" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -267,23 +267,23 @@ dependencies = [ [[package]] name = "quasi" -version = "0.3.10" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "quasi_codegen" -version = "0.3.10" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aster 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "aster 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "quasi_macros" -version = "0.3.9" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quasi_codegen 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", + "quasi_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -334,12 +334,12 @@ dependencies = [ [[package]] name = "serde_codegen" -version = "0.6.6" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aster 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "quasi 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", - "quasi_macros 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aster 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quasi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quasi_macros 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -347,7 +347,7 @@ name = "serde_macros" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde_codegen 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_codegen 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -415,7 +415,7 @@ dependencies = [ [[package]] name = "tenacious" version = "0.0.15" -source = "git+https://github.com/Manishearth/rust-tenacious#3eaa89911cf32b09b869fcc4e998be535e4f8c8d" +source = "git+https://github.com/Manishearth/rust-tenacious#ea664e2dfe6f0a1a108ab5369b4271d8473eca47" [[package]] name = "time" diff --git a/ports/gonk/Cargo.lock b/ports/gonk/Cargo.lock index 2d355cf7725..ad2a08c3f9c 100644 --- a/ports/gonk/Cargo.lock +++ b/ports/gonk/Cargo.lock @@ -67,7 +67,7 @@ dependencies = [ [[package]] name = "aster" -version = "0.9.2" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -543,7 +543,7 @@ dependencies = [ [[package]] name = "gaol" version = "0.0.1" -source = "git+https://github.com/servo/gaol#e1349d8d3d933b3a90f9c86baa390261c510e019" +source = "git+https://github.com/servo/gaol#491dba122d6741ea4e56c754505a69f6319d41e3" dependencies = [ "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1329,23 +1329,23 @@ dependencies = [ [[package]] name = "quasi" -version = "0.3.10" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "quasi_codegen" -version = "0.3.10" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aster 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", + "aster 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "quasi_macros" -version = "0.3.9" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quasi_codegen 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", + "quasi_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1487,12 +1487,12 @@ dependencies = [ [[package]] name = "serde_codegen" -version = "0.6.6" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aster 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "quasi 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", - "quasi_macros 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "aster 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quasi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quasi_macros 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1509,7 +1509,7 @@ name = "serde_macros" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde_codegen 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_codegen 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1759,7 +1759,7 @@ dependencies = [ [[package]] name = "tenacious" version = "0.0.15" -source = "git+https://github.com/Manishearth/rust-tenacious#3eaa89911cf32b09b869fcc4e998be535e4f8c8d" +source = "git+https://github.com/Manishearth/rust-tenacious#ea664e2dfe6f0a1a108ab5369b4271d8473eca47" [[package]] name = "tendril" diff --git a/rust-nightly-date b/rust-nightly-date index b8153ce8e0b..4c32d07e17c 100644 --- a/rust-nightly-date +++ b/rust-nightly-date @@ -1 +1 @@ -2015-12-27 +2016-01-31 |