Bump Rust to 2016-01-31 nightly

This commit is contained in:
Anthony Ramine 2016-01-29 02:03:50 +01:00 committed by Ms2ger
parent e7371b36dd
commit 436b952298
9 changed files with 81 additions and 73 deletions

View file

@ -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() {

View file

@ -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 {

View file

@ -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) {

View file

@ -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"

View file

@ -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>());

26
ports/cef/Cargo.lock generated
View file

@ -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"

View file

@ -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"

26
ports/gonk/Cargo.lock generated
View file

@ -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"

View file

@ -1 +1 @@
2015-12-27
2016-01-31