cleanup for make check

This commit is contained in:
John Clements 2013-01-31 18:14:27 -08:00
parent 4af7c643f2
commit a2839246be
4 changed files with 12 additions and 11 deletions

View File

@ -286,7 +286,7 @@ pub fn load_link(mis: ~[@ast::meta_item]) -> (Option<~str>,
let mut uuid = None;
for mis.each |a| {
match a.node {
ast::meta_name_value(v, ast::spanned { node: ast::lit_str(s),
ast::meta_name_value(v, codemap::spanned { node: ast::lit_str(s),
_ }) => {
match v {
~"name" => name = Some(*s),
@ -314,7 +314,7 @@ pub fn load_crate(filename: &Path) -> Option<Crate> {
for c.node.attrs.each |a| {
match a.node.value.node {
ast::meta_name_value(v, ast::spanned { node: ast::lit_str(_),
ast::meta_name_value(v, codemap::spanned { node: ast::lit_str(_),
_ }) => {
match v {
~"desc" => desc = Some(v),

View File

@ -74,12 +74,12 @@ pub fn common_exprs() -> ~[ast::expr] {
id: 0,
callee_id: -1,
node: e,
span: ast_util::dummy_sp(),
span: codemap::dummy_sp(),
}
}
fn dsl(l: ast::lit_) -> ast::lit {
ast::spanned { node: l, span: ast_util::dummy_sp() }
codemap::spanned { node: l, span: codemap::dummy_sp() }
}
~[dse(ast::expr_break(option::None)),

View File

@ -344,14 +344,15 @@ pub mod test {
use syntax::ast;
use syntax::ast_util;
use syntax::codemap;
pub fn make_crate_type_attr(+t: ~str) -> ast::attribute {
ast_util::respan(codemap::dummy_sp(), ast::attribute_ {
codemap::respan(codemap::dummy_sp(), ast::attribute_ {
style: ast::attr_outer,
value: ast_util::respan(codemap::dummy_sp(),
value: codemap::respan(codemap::dummy_sp(),
ast::meta_name_value(
~"crate_type",
ast_util::respan(codemap::dummy_sp(),
codemap::respan(codemap::dummy_sp(),
ast::lit_str(@t)))),
is_sugared_doc: false
})
@ -361,7 +362,7 @@ pub mod test {
let mut attrs = ~[];
if with_bin { attrs += ~[make_crate_type_attr(~"bin")]; }
if with_lib { attrs += ~[make_crate_type_attr(~"lib")]; }
@ast_util::respan(codemap::dummy_sp(), ast::crate_ {
@codemap::respan(codemap::dummy_sp(), ast::crate_ {
module: ast::_mod { view_items: ~[], items: ~[] },
attrs: attrs,
config: ~[]

View File

@ -1515,7 +1515,7 @@ pub impl Parser {
token::EQ => {
self.bump();
let rhs = self.parse_expr();
self.mk_expr(lo, rhs.span.hi, expr_assign(lhs, rhs))
self.mk_expr(lo, rhs.span.hi, expr_assign(lhs, rhs))
}
token::BINOPEQ(op) => {
self.bump();
@ -1569,7 +1569,7 @@ pub impl Parser {
hi = elexpr.span.hi;
}
let q = {cond: cond, then: thn, els: els, lo: lo, hi: hi};
f.mk_expr(q.lo, q.hi, expr_if(q.cond, q.then, q.els))
self.mk_expr(q.lo, q.hi, expr_if(q.cond, q.then, q.els))
}
fn parse_fn_expr(proto: Proto) -> @expr {
@ -1582,7 +1582,7 @@ pub impl Parser {
let body = self.parse_block();
self.mk_expr(lo, body.span.hi,
expr_fn(proto, decl, body, capture_clause));
expr_fn(proto, decl, body, @()))
}
// `|args| { ... }` like in `do` expressions