Upgrade to rustc 1.2.0-dev (474c6e0ae 2015-05-30)

This commit is contained in:
Manish Goregaokar 2015-06-01 22:03:27 +05:30
parent 2a8d595289
commit f94eced1f5
8 changed files with 333 additions and 225 deletions

View file

@ -34,7 +34,7 @@ pub fn expand_dom_struct(cx: &mut ExtCtxt, sp: Span, _: &MetaItem, anno: Annotat
///
/// The expansion basically calls `trace()` on all of the fields of the struct/enum, erroring if they do not
/// implement the method.
pub fn expand_jstraceable(cx: &mut ExtCtxt, span: Span, mitem: &MetaItem, item: Annotatable,
pub fn expand_jstraceable(cx: &mut ExtCtxt, span: Span, mitem: &MetaItem, item: &Annotatable,
push: &mut FnMut(Annotatable)) {
let trait_def = TraitDef {
span: span,
@ -57,7 +57,7 @@ pub fn expand_jstraceable(cx: &mut ExtCtxt, span: Span, mitem: &MetaItem, item:
],
associated_types: vec![],
};
trait_def.expand(cx, mitem, &item, push)
trait_def.expand(cx, mitem, item, push)
}
// Mostly copied from syntax::ext::deriving::hash

View file

@ -91,11 +91,11 @@ impl LintPass for UnrootedPass {
fn check_fn(&mut self, cx: &Context, kind: visit::FnKind, decl: &ast::FnDecl,
block: &ast::Block, _span: codemap::Span, id: ast::NodeId) {
match kind {
visit::FkItemFn(i, _, _, _, _) |
visit::FkItemFn(i, _, _, _, _, _) |
visit::FkMethod(i, _, _) if i.as_str() == "new" || i.as_str() == "new_inherited" => {
return;
},
visit::FkItemFn(_, _, style, _, _) => match style {
visit::FkItemFn(_, _, style, _, _, _) => match style {
ast::Unsafety::Unsafe => return,
_ => ()
},

View file

@ -9,9 +9,9 @@ use syntax::ast;
use utils::match_ty_unwrap;
pub fn expand_reflector(cx: &mut ExtCtxt, span: Span, _: &MetaItem, annotatable: Annotatable,
pub fn expand_reflector(cx: &mut ExtCtxt, span: Span, _: &MetaItem, annotatable: &Annotatable,
push: &mut FnMut(Annotatable)) {
if let Annotatable::Item(item) = annotatable {
if let &Annotatable::Item(ref item) = 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

View file

@ -76,7 +76,7 @@ pub fn unsafe_context(map: &ast_map::Map, id: ast::NodeId) -> bool {
},
Some(ast_map::NodeItem(itm)) => {
match itm.node {
ast::ItemFn(_, style, _, _, _) => match style {
ast::ItemFn(_, style, _, _, _, _) => match style {
ast::Unsafety::Unsafe => true,
_ => false,
},