Skip to content

Commit e84482f

Browse files
author
bors-servo
committed
Auto merge of #8446 - servo:rustup_20151110, r=<try>
Rust upgrade to rustc 1.6.0-nightly (5b4986fa5 2015-11-08) DO NOT r+ or try+ this It causes an OOM (rust-lang/rust#29740) and can crash the OS. Probably will set our CI on fire. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8446) <!-- Reviewable:end -->
2 parents 4848e37 + 5620f6a commit e84482f

File tree

14 files changed

+156
-135
lines changed

14 files changed

+156
-135
lines changed

components/net/about_loader.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use mime_classifier::MIMEClassifier;
1010
use net_traits::ProgressMsg::Done;
1111
use net_traits::{LoadConsumer, LoadData, Metadata};
1212
use resource_task::{CancellationListener, send_error, start_sending_sniffed_opt};
13-
use std::fs::PathExt;
1413
use std::sync::Arc;
1514
use url::Url;
1615
use util::resource_files::resources_dir_path;

components/plugins/lints/inheritance_integrity.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ impl LintPass for InheritancePass {
2424
}
2525

2626
impl LateLintPass for InheritancePass {
27-
fn check_struct_def(&mut self, cx: &LateContext, def: &hir::StructDef, _n: ast::Name,
27+
fn check_struct_def(&mut self, cx: &LateContext, def: &hir::VariantData, _n: ast::Name,
2828
_gen: &hir::Generics, id: ast::NodeId) {
2929
// Lints are run post expansion, so it's fine to use
3030
// #[_dom_struct_marker] here without also checking for #[dom_struct]
3131
if cx.tcx.has_attr(cx.tcx.map.local_def_id(id), "_dom_struct_marker") {
3232
// Find the reflector, if any
33-
let reflector_span = def.fields.iter().enumerate()
33+
let reflector_span = def.fields().iter().enumerate()
3434
.find(|&(ctr, f)| {
3535
if match_lang_ty(cx, &*f.node.ty, "reflector") {
3636
if ctr > 0 {
@@ -44,7 +44,7 @@ impl LateLintPass for InheritancePass {
4444
})
4545
.map(|(_, f)| f.span);
4646
// Find all #[dom_struct] fields
47-
let dom_spans: Vec<_> = def.fields.iter().enumerate().filter_map(|(ctr, f)| {
47+
let dom_spans: Vec<_> = def.fields().iter().enumerate().filter_map(|(ctr, f)| {
4848
if let hir::TyPath(..) = f.node.ty.node {
4949
if let Some(&def::PathResolution { base_def: def::DefTy(def_id, _), .. }) =
5050
cx.tcx.def_map.borrow().get(&f.node.ty.id) {

components/plugins/lints/privatize.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ impl LintPass for PrivatizePass {
2525
impl LateLintPass for PrivatizePass {
2626
fn check_struct_def(&mut self,
2727
cx: &LateContext,
28-
def: &hir::StructDef,
28+
def: &hir::VariantData,
2929
_n: ast::Name,
3030
_gen: &hir::Generics,
3131
id: ast::NodeId) {
3232
if cx.tcx.has_attr(cx.tcx.map.local_def_id(id), "privatize") {
33-
for field in &def.fields {
33+
for field in def.fields() {
3434
match field.node {
3535
hir::StructField_ { kind: hir::NamedField(name, visibility), .. } if visibility == hir::Public => {
3636
cx.span_lint(PRIVATIZE, field.span,

components/plugins/lints/unrooted_must_root.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl LateLintPass for UnrootedPass {
8080
/// All structs containing #[must_root] types must be #[must_root] themselves
8181
fn check_struct_def(&mut self,
8282
cx: &LateContext,
83-
def: &hir::StructDef,
83+
def: &hir::VariantData,
8484
_n: ast::Name,
8585
_gen: &hir::Generics,
8686
id: ast::NodeId) {
@@ -89,7 +89,7 @@ impl LateLintPass for UnrootedPass {
8989
_ => cx.tcx.map.expect_item(cx.tcx.map.get_parent(id)),
9090
};
9191
if item.attrs.iter().all(|a| !a.check_name("must_root")) {
92-
for ref field in &def.fields {
92+
for ref field in def.fields() {
9393
if is_unrooted_ty(cx, cx.tcx.node_id_to_type(field.node.id), false) {
9494
cx.span_lint(UNROOTED_MUST_ROOT, field.span,
9595
"Type must be rooted, use #[must_root] on the struct definition to propagate")
@@ -101,13 +101,13 @@ impl LateLintPass for UnrootedPass {
101101
/// All enums containing #[must_root] types must be #[must_root] themselves
102102
fn check_variant(&mut self, cx: &LateContext, var: &hir::Variant, _gen: &hir::Generics) {
103103
let ref map = cx.tcx.map;
104-
if map.expect_item(map.get_parent(var.node.id)).attrs.iter().all(|a| !a.check_name("must_root")) {
105-
match var.node.kind {
106-
hir::TupleVariantKind(ref vec) => {
104+
if map.expect_item(map.get_parent(var.node.data.id())).attrs.iter().all(|a| !a.check_name("must_root")) {
105+
match var.node.data {
106+
hir::VariantData::Tuple(ref vec, _) => {
107107
for ty in vec {
108-
cx.tcx.ast_ty_to_ty_cache.borrow().get(&ty.id).map(|t| {
108+
cx.tcx.ast_ty_to_ty_cache.borrow().get(&ty.node.id).map(|t| {
109109
if is_unrooted_ty(cx, t, false) {
110-
cx.span_lint(UNROOTED_MUST_ROOT, ty.ty.span,
110+
cx.span_lint(UNROOTED_MUST_ROOT, ty.node.ty.span,
111111
"Type must be rooted, use #[must_root] on \
112112
the enum definition to propagate")
113113
}

components/plugins/reflector.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub fn expand_reflector(cx: &mut ExtCtxt, span: Span, _: &MetaItem, annotatable:
1515
if let ast::ItemStruct(ref def, _) = item.node {
1616
let struct_name = item.ident;
1717
// This path has to be hardcoded, unfortunately, since we can't resolve paths at expansion time
18-
match def.fields.iter().find(
18+
match def.fields().iter().find(
1919
|f| match_ty_unwrap(&*f.node.ty, &["dom", "bindings", "reflector", "Reflector"]).is_some()) {
2020
// If it has a field that is a Reflector, use that
2121
Some(f) => {
@@ -34,7 +34,7 @@ pub fn expand_reflector(cx: &mut ExtCtxt, span: Span, _: &MetaItem, annotatable:
3434
},
3535
// Or just call it on the first field (supertype).
3636
None => {
37-
let field_name = def.fields[0].node.ident();
37+
let field_name = def.fields()[0].node.ident();
3838
let impl_item = quote_item!(cx,
3939
impl ::dom::bindings::reflector::Reflectable for $struct_name {
4040
fn reflector<'a>(&'a self) -> &'a ::dom::bindings::reflector::Reflector {

components/servo/Cargo.lock

Lines changed: 33 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/util/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
#![feature(heap_api)]
1212
#![feature(oom)]
1313
#![feature(optin_builtin_traits)]
14-
#![cfg_attr(not(target_os = "android"), feature(path_ext))]
1514
#![feature(plugin)]
16-
#![feature(slice_splits)]
1715
#![feature(step_by)]
1816
#![feature(step_trait)]
1917
#![feature(zero_one)]

components/util/resource_files.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ pub fn resources_dir_path() -> PathBuf {
2626
#[cfg(not(target_os = "android"))]
2727
pub fn resources_dir_path() -> PathBuf {
2828
use std::env;
29-
use std::fs::PathExt;
3029

3130
match *CMD_RESOURCE_DIR.lock().unwrap() {
3231
Some(ref path) => PathBuf::from(path),

0 commit comments

Comments
 (0)