mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Rust upgrade to nightly 20151002
This commit is contained in:
parent
ba2714f4f6
commit
48b3259c90
8 changed files with 52 additions and 54 deletions
|
@ -4,7 +4,6 @@
|
|||
|
||||
use rustc::lint::{LateContext, LintPass, LintArray, Level, LateLintPass, LintContext};
|
||||
use rustc::middle::def;
|
||||
use rustc::middle::def_id::DefId;
|
||||
use rustc_front::hir;
|
||||
use syntax::ast;
|
||||
use utils::match_lang_ty;
|
||||
|
@ -25,11 +24,11 @@ impl LintPass for InheritancePass {
|
|||
}
|
||||
|
||||
impl LateLintPass for InheritancePass {
|
||||
fn check_struct_def(&mut self, cx: &LateContext, def: &hir::StructDef, _i: ast::Ident,
|
||||
fn check_struct_def(&mut self, cx: &LateContext, def: &hir::StructDef, _n: ast::Name,
|
||||
_gen: &hir::Generics, id: ast::NodeId) {
|
||||
// Lints are run post expansion, so it's fine to use
|
||||
// #[_dom_struct_marker] here without also checking for #[dom_struct]
|
||||
if cx.tcx.has_attr(DefId::local(id), "_dom_struct_marker") {
|
||||
if cx.tcx.has_attr(cx.tcx.map.local_def_id(id), "_dom_struct_marker") {
|
||||
// Find the reflector, if any
|
||||
let reflector_span = def.fields.iter().enumerate()
|
||||
.find(|&(ctr, f)| {
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use rustc::lint::{LateContext, LintPass, LintArray, LateLintPass, LintContext};
|
||||
use rustc::middle::def_id::DefId;
|
||||
use rustc_front::hir;
|
||||
use syntax::ast;
|
||||
use syntax::attr::AttrMetaMethods;
|
||||
|
@ -27,16 +26,16 @@ impl LateLintPass for PrivatizePass {
|
|||
fn check_struct_def(&mut self,
|
||||
cx: &LateContext,
|
||||
def: &hir::StructDef,
|
||||
_i: ast::Ident,
|
||||
_n: ast::Name,
|
||||
_gen: &hir::Generics,
|
||||
id: ast::NodeId) {
|
||||
if cx.tcx.has_attr(DefId::local(id), "privatize") {
|
||||
if cx.tcx.has_attr(cx.tcx.map.local_def_id(id), "privatize") {
|
||||
for field in &def.fields {
|
||||
match field.node {
|
||||
hir::StructField_ { kind: hir::NamedField(ident, visibility), .. } if visibility == hir::Public => {
|
||||
hir::StructField_ { kind: hir::NamedField(name, visibility), .. } if visibility == hir::Public => {
|
||||
cx.span_lint(PRIVATIZE, field.span,
|
||||
&format!("Field {} is public where only private fields are allowed",
|
||||
ident.name));
|
||||
name));
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ impl LateLintPass for StrToStringPass {
|
|||
fn check_expr(&mut self, cx: &LateContext, expr: &hir::Expr) {
|
||||
match expr.node {
|
||||
hir::ExprMethodCall(ref method, _, ref args)
|
||||
if method.node.name.as_str() == "to_string"
|
||||
if method.node.as_str() == "to_string"
|
||||
&& is_str(cx, &*args[0]) => {
|
||||
cx.span_lint(STR_TO_STRING, expr.span,
|
||||
"str.to_owned() is more efficient than str.to_string(), please use it instead");
|
||||
|
|
|
@ -84,7 +84,7 @@ impl LateLintPass for UnrootedPass {
|
|||
fn check_struct_def(&mut self,
|
||||
cx: &LateContext,
|
||||
def: &hir::StructDef,
|
||||
_i: ast::Ident,
|
||||
_n: ast::Name,
|
||||
_gen: &hir::Generics,
|
||||
id: ast::NodeId) {
|
||||
let item = match cx.tcx.map.get(id) {
|
||||
|
@ -124,10 +124,10 @@ impl LateLintPass for UnrootedPass {
|
|||
fn check_fn(&mut self, cx: &LateContext, kind: visit::FnKind, decl: &hir::FnDecl,
|
||||
block: &hir::Block, _span: codemap::Span, id: ast::NodeId) {
|
||||
match kind {
|
||||
visit::FnKind::ItemFn(i, _, _, _, _, _) |
|
||||
visit::FnKind::Method(i, _, _) if i.name.as_str() == "new"
|
||||
|| i.name.as_str() == "new_inherited"
|
||||
|| i.name.as_str() == "new_initialized" => {
|
||||
visit::FnKind::ItemFn(n, _, _, _, _, _) |
|
||||
visit::FnKind::Method(n, _, _) if n.as_str() == "new"
|
||||
|| n.as_str() == "new_inherited"
|
||||
|| n.as_str() == "new_initialized" => {
|
||||
self.in_new_function = true;
|
||||
return;
|
||||
},
|
||||
|
|
26
components/servo/Cargo.lock
generated
26
components/servo/Cargo.lock
generated
|
@ -84,7 +84,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "aster"
|
||||
version = "0.4.7"
|
||||
version = "0.4.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
@ -806,10 +806,10 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "html5ever"
|
||||
version = "0.2.5"
|
||||
version = "0.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"html5ever_macros 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"html5ever_macros 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -824,7 +824,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "html5ever_macros"
|
||||
version = "0.2.3"
|
||||
version = "0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1315,7 +1315,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
name = "plugins"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"tenacious 0.0.10 (git+https://github.com/Manishearth/rust-tenacious)",
|
||||
"tenacious 0.0.11 (git+https://github.com/Manishearth/rust-tenacious)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1383,10 +1383,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "quasi_codegen"
|
||||
version = "0.3.2"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"aster 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"aster 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1394,7 +1394,7 @@ name = "quasi_macros"
|
|||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"quasi_codegen 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quasi_codegen 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1463,7 +1463,7 @@ dependencies = [
|
|||
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"html5ever 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"html5ever 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.1.0 (git+https://github.com/pcwalton/ipc-channel)",
|
||||
"js 0.1.0 (git+https://github.com/servo/rust-mozjs)",
|
||||
|
@ -1548,7 +1548,7 @@ name = "serde_codegen"
|
|||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"aster 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"aster 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quasi 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quasi_macros 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -1753,8 +1753,8 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tenacious"
|
||||
version = "0.0.10"
|
||||
source = "git+https://github.com/Manishearth/rust-tenacious#f02b78715ac10ddad67116448ea9697b5a03dfaa"
|
||||
version = "0.0.11"
|
||||
source = "git+https://github.com/Manishearth/rust-tenacious#f9916c35fd76fdbe984659ab3ce30d752739f114"
|
||||
|
||||
[[package]]
|
||||
name = "tendril"
|
||||
|
@ -1845,7 +1845,7 @@ dependencies = [
|
|||
"cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"html5ever 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"html5ever 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.1.0 (git+https://github.com/pcwalton/ipc-channel)",
|
||||
"js 0.1.0 (git+https://github.com/servo/rust-mozjs)",
|
||||
|
|
26
ports/cef/Cargo.lock
generated
26
ports/cef/Cargo.lock
generated
|
@ -76,7 +76,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "aster"
|
||||
version = "0.4.7"
|
||||
version = "0.4.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
@ -757,10 +757,10 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "html5ever"
|
||||
version = "0.2.5"
|
||||
version = "0.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"html5ever_macros 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"html5ever_macros 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -775,7 +775,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "html5ever_macros"
|
||||
version = "0.2.3"
|
||||
version = "0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1250,7 +1250,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
name = "plugins"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"tenacious 0.0.10 (git+https://github.com/Manishearth/rust-tenacious)",
|
||||
"tenacious 0.0.11 (git+https://github.com/Manishearth/rust-tenacious)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1316,10 +1316,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "quasi_codegen"
|
||||
version = "0.3.2"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"aster 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"aster 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1327,7 +1327,7 @@ name = "quasi_macros"
|
|||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"quasi_codegen 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quasi_codegen 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1396,7 +1396,7 @@ dependencies = [
|
|||
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"html5ever 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"html5ever 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.1.0 (git+https://github.com/pcwalton/ipc-channel)",
|
||||
"js 0.1.0 (git+https://github.com/servo/rust-mozjs)",
|
||||
|
@ -1473,7 +1473,7 @@ name = "serde_codegen"
|
|||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"aster 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"aster 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quasi 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quasi_macros 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -1695,8 +1695,8 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tenacious"
|
||||
version = "0.0.10"
|
||||
source = "git+https://github.com/Manishearth/rust-tenacious#f02b78715ac10ddad67116448ea9697b5a03dfaa"
|
||||
version = "0.0.11"
|
||||
source = "git+https://github.com/Manishearth/rust-tenacious#f9916c35fd76fdbe984659ab3ce30d752739f114"
|
||||
|
||||
[[package]]
|
||||
name = "tendril"
|
||||
|
@ -1787,7 +1787,7 @@ dependencies = [
|
|||
"cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"html5ever 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"html5ever 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.1.0 (git+https://github.com/pcwalton/ipc-channel)",
|
||||
"js 0.1.0 (git+https://github.com/servo/rust-mozjs)",
|
||||
|
|
26
ports/gonk/Cargo.lock
generated
26
ports/gonk/Cargo.lock
generated
|
@ -62,7 +62,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "aster"
|
||||
version = "0.4.7"
|
||||
version = "0.4.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
@ -641,10 +641,10 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "html5ever"
|
||||
version = "0.2.5"
|
||||
version = "0.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"html5ever_macros 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"html5ever_macros 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -659,7 +659,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "html5ever_macros"
|
||||
version = "0.2.3"
|
||||
version = "0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1111,7 +1111,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
name = "plugins"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"tenacious 0.0.10 (git+https://github.com/Manishearth/rust-tenacious)",
|
||||
"tenacious 0.0.11 (git+https://github.com/Manishearth/rust-tenacious)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1177,10 +1177,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "quasi_codegen"
|
||||
version = "0.3.2"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"aster 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"aster 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1188,7 +1188,7 @@ name = "quasi_macros"
|
|||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"quasi_codegen 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quasi_codegen 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1257,7 +1257,7 @@ dependencies = [
|
|||
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"html5ever 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"html5ever 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.1.0 (git+https://github.com/pcwalton/ipc-channel)",
|
||||
"js 0.1.0 (git+https://github.com/servo/rust-mozjs)",
|
||||
|
@ -1334,7 +1334,7 @@ name = "serde_codegen"
|
|||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"aster 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"aster 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quasi 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quasi_macros 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -1525,8 +1525,8 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tenacious"
|
||||
version = "0.0.10"
|
||||
source = "git+https://github.com/Manishearth/rust-tenacious#f02b78715ac10ddad67116448ea9697b5a03dfaa"
|
||||
version = "0.0.11"
|
||||
source = "git+https://github.com/Manishearth/rust-tenacious#f9916c35fd76fdbe984659ab3ce30d752739f114"
|
||||
|
||||
[[package]]
|
||||
name = "tendril"
|
||||
|
@ -1617,7 +1617,7 @@ dependencies = [
|
|||
"cssparser 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"html5ever 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"html5ever 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.1.0 (git+https://github.com/pcwalton/ipc-channel)",
|
||||
"js 0.1.0 (git+https://github.com/servo/rust-mozjs)",
|
||||
|
|
|
@ -1 +1 @@
|
|||
f93ab64d4a1a7ee91759a1594ab2a426b6cc657e/rustc-1.5.0-dev
|
||||
168a23ebe1729386138fa71643382fdd64fac205/rustc-1.5.0-dev
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue