1
Fork 0

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; let mut uuid = None;
for mis.each |a| { for mis.each |a| {
match a.node { 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 { match v {
~"name" => name = Some(*s), ~"name" => name = Some(*s),
@ -314,7 +314,7 @@ pub fn load_crate(filename: &Path) -> Option<Crate> {
for c.node.attrs.each |a| { for c.node.attrs.each |a| {
match a.node.value.node { 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 { match v {
~"desc" => desc = Some(v), ~"desc" => desc = Some(v),

View file

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

View file

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

View file

@ -1569,7 +1569,7 @@ pub impl Parser {
hi = elexpr.span.hi; hi = elexpr.span.hi;
} }
let q = {cond: cond, then: thn, els: els, lo: lo, hi: 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 { fn parse_fn_expr(proto: Proto) -> @expr {
@ -1582,7 +1582,7 @@ pub impl Parser {
let body = self.parse_block(); let body = self.parse_block();
self.mk_expr(lo, body.span.hi, self.mk_expr(lo, body.span.hi,
expr_fn(proto, decl, body, capture_clause)); expr_fn(proto, decl, body, @()))
} }
// `|args| { ... }` like in `do` expressions // `|args| { ... }` like in `do` expressions