Skip to content

Commit

Permalink
Auto merge of #8446 - servo:rustup_20151110, r=<try>
Browse files Browse the repository at this point in the history
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 -->
  • Loading branch information
bors-servo committed Nov 12, 2015
2 parents 4848e37 + 5620f6a commit e84482f
Show file tree
Hide file tree
Showing 14 changed files with 156 additions and 135 deletions.
1 change: 0 additions & 1 deletion components/net/about_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use mime_classifier::MIMEClassifier;
use net_traits::ProgressMsg::Done;
use net_traits::{LoadConsumer, LoadData, Metadata};
use resource_task::{CancellationListener, send_error, start_sending_sniffed_opt};
use std::fs::PathExt;
use std::sync::Arc;
use url::Url;
use util::resource_files::resources_dir_path;
Expand Down
6 changes: 3 additions & 3 deletions components/plugins/lints/inheritance_integrity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ impl LintPass for InheritancePass {
}

impl LateLintPass for InheritancePass {
fn check_struct_def(&mut self, cx: &LateContext, def: &hir::StructDef, _n: ast::Name,
fn check_struct_def(&mut self, cx: &LateContext, def: &hir::VariantData, _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(cx.tcx.map.local_def_id(id), "_dom_struct_marker") {
// Find the reflector, if any
let reflector_span = def.fields.iter().enumerate()
let reflector_span = def.fields().iter().enumerate()
.find(|&(ctr, f)| {
if match_lang_ty(cx, &*f.node.ty, "reflector") {
if ctr > 0 {
Expand All @@ -44,7 +44,7 @@ impl LateLintPass for InheritancePass {
})
.map(|(_, f)| f.span);
// Find all #[dom_struct] fields
let dom_spans: Vec<_> = def.fields.iter().enumerate().filter_map(|(ctr, f)| {
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, _), .. }) =
cx.tcx.def_map.borrow().get(&f.node.ty.id) {
Expand Down
4 changes: 2 additions & 2 deletions components/plugins/lints/privatize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ impl LintPass for PrivatizePass {
impl LateLintPass for PrivatizePass {
fn check_struct_def(&mut self,
cx: &LateContext,
def: &hir::StructDef,
def: &hir::VariantData,
_n: ast::Name,
_gen: &hir::Generics,
id: ast::NodeId) {
if cx.tcx.has_attr(cx.tcx.map.local_def_id(id), "privatize") {
for field in &def.fields {
for field in def.fields() {
match field.node {
hir::StructField_ { kind: hir::NamedField(name, visibility), .. } if visibility == hir::Public => {
cx.span_lint(PRIVATIZE, field.span,
Expand Down
14 changes: 7 additions & 7 deletions components/plugins/lints/unrooted_must_root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl LateLintPass for UnrootedPass {
/// All structs containing #[must_root] types must be #[must_root] themselves
fn check_struct_def(&mut self,
cx: &LateContext,
def: &hir::StructDef,
def: &hir::VariantData,
_n: ast::Name,
_gen: &hir::Generics,
id: ast::NodeId) {
Expand All @@ -89,7 +89,7 @@ impl LateLintPass for UnrootedPass {
_ => cx.tcx.map.expect_item(cx.tcx.map.get_parent(id)),
};
if item.attrs.iter().all(|a| !a.check_name("must_root")) {
for ref field in &def.fields {
for ref field in def.fields() {
if is_unrooted_ty(cx, cx.tcx.node_id_to_type(field.node.id), false) {
cx.span_lint(UNROOTED_MUST_ROOT, field.span,
"Type must be rooted, use #[must_root] on the struct definition to propagate")
Expand All @@ -101,13 +101,13 @@ impl LateLintPass for UnrootedPass {
/// All enums containing #[must_root] types must be #[must_root] themselves
fn check_variant(&mut self, cx: &LateContext, var: &hir::Variant, _gen: &hir::Generics) {
let ref map = cx.tcx.map;
if map.expect_item(map.get_parent(var.node.id)).attrs.iter().all(|a| !a.check_name("must_root")) {
match var.node.kind {
hir::TupleVariantKind(ref vec) => {
if map.expect_item(map.get_parent(var.node.data.id())).attrs.iter().all(|a| !a.check_name("must_root")) {
match var.node.data {
hir::VariantData::Tuple(ref vec, _) => {
for ty in vec {
cx.tcx.ast_ty_to_ty_cache.borrow().get(&ty.id).map(|t| {
cx.tcx.ast_ty_to_ty_cache.borrow().get(&ty.node.id).map(|t| {
if is_unrooted_ty(cx, t, false) {
cx.span_lint(UNROOTED_MUST_ROOT, ty.ty.span,
cx.span_lint(UNROOTED_MUST_ROOT, ty.node.ty.span,
"Type must be rooted, use #[must_root] on \
the enum definition to propagate")
}
Expand Down
4 changes: 2 additions & 2 deletions components/plugins/reflector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub fn expand_reflector(cx: &mut ExtCtxt, span: Span, _: &MetaItem, annotatable:
if let ast::ItemStruct(ref def, _) = item.node {
let struct_name = item.ident;
// This path has to be hardcoded, unfortunately, since we can't resolve paths at expansion time
match def.fields.iter().find(
match def.fields().iter().find(
|f| match_ty_unwrap(&*f.node.ty, &["dom", "bindings", "reflector", "Reflector"]).is_some()) {
// If it has a field that is a Reflector, use that
Some(f) => {
Expand All @@ -34,7 +34,7 @@ pub fn expand_reflector(cx: &mut ExtCtxt, span: Span, _: &MetaItem, annotatable:
},
// Or just call it on the first field (supertype).
None => {
let field_name = def.fields[0].node.ident();
let field_name = def.fields()[0].node.ident();
let impl_item = quote_item!(cx,
impl ::dom::bindings::reflector::Reflectable for $struct_name {
fn reflector<'a>(&'a self) -> &'a ::dom::bindings::reflector::Reflector {
Expand Down
66 changes: 33 additions & 33 deletions components/servo/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions components/util/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
#![feature(heap_api)]
#![feature(oom)]
#![feature(optin_builtin_traits)]
#![cfg_attr(not(target_os = "android"), feature(path_ext))]
#![feature(plugin)]
#![feature(slice_splits)]
#![feature(step_by)]
#![feature(step_trait)]
#![feature(zero_one)]
Expand Down
1 change: 0 additions & 1 deletion components/util/resource_files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ pub fn resources_dir_path() -> PathBuf {
#[cfg(not(target_os = "android"))]
pub fn resources_dir_path() -> PathBuf {
use std::env;
use std::fs::PathExt;

match *CMD_RESOURCE_DIR.lock().unwrap() {
Some(ref path) => PathBuf::from(path),
Expand Down
Loading

0 comments on commit e84482f

Please sign in to comment.