diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-05-01 15:52:38 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-05-02 13:57:58 +0530 |
| commit | 5892b40859b65dd520ae92f7570069adaf313a8f (patch) | |
| tree | 50151f9db04bb346da56122db92c4ff1c93adb92 /src/libsyntax/ext | |
| parent | 4957ecce3ede95c4415dbcc7a136f9d4ebd5cb4e (diff) | |
| download | rust-5892b40859b65dd520ae92f7570069adaf313a8f.tar.gz rust-5892b40859b65dd520ae92f7570069adaf313a8f.zip | |
Rename AstBuilder::expr_int -> AstBuilder::expr_isize
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/build.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/generic/mod.rs | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index cde16d25412..354a0bff749 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -146,7 +146,7 @@ pub trait AstBuilder { fn expr_lit(&self, sp: Span, lit: ast::Lit_) -> P<ast::Expr>; fn expr_usize(&self, span: Span, i: usize) -> P<ast::Expr>; - fn expr_int(&self, sp: Span, i: isize) -> P<ast::Expr>; + fn expr_isize(&self, sp: Span, i: isize) -> P<ast::Expr>; fn expr_u8(&self, sp: Span, u: u8) -> P<ast::Expr>; fn expr_u32(&self, sp: Span, u: u32) -> P<ast::Expr>; fn expr_bool(&self, sp: Span, value: bool) -> P<ast::Expr>; @@ -698,7 +698,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> { fn expr_usize(&self, span: Span, i: usize) -> P<ast::Expr> { self.expr_lit(span, ast::LitInt(i as u64, ast::UnsignedIntLit(ast::TyUs))) } - fn expr_int(&self, sp: Span, i: isize) -> P<ast::Expr> { + fn expr_isize(&self, sp: Span, i: isize) -> P<ast::Expr> { self.expr_lit(sp, ast::LitInt(i as u64, ast::SignedIntLit(ast::TyIs, ast::Sign::new(i)))) } diff --git a/src/libsyntax/ext/deriving/generic/mod.rs b/src/libsyntax/ext/deriving/generic/mod.rs index 22f62d9efa0..339e535cdcd 100644 --- a/src/libsyntax/ext/deriving/generic/mod.rs +++ b/src/libsyntax/ext/deriving/generic/mod.rs @@ -380,7 +380,7 @@ impl<'a> TraitDef<'a> { pub fn expand(&self, cx: &mut ExtCtxt, mitem: &ast::MetaItem, - item: &'a ast::Item, + item: &'a ast::Item, push: &mut FnMut(P<ast::Item>)) { let newitem = match item.node { @@ -1407,7 +1407,9 @@ impl<'a> TraitDef<'a> { struct_def: &'a StructDef, prefix: &str, mutbl: ast::Mutability) - -> (P<ast::Pat>, Vec<(Span, Option<Ident>, P<Expr>, &'a [ast::Attribute])>) { + -> (P<ast::Pat>, Vec<(Span, Option<Ident>, + P<Expr>, + &'a [ast::Attribute])>) { if struct_def.fields.is_empty() { return (cx.pat_enum(self.span, struct_path, vec![]), vec![]); } @@ -1445,7 +1447,8 @@ impl<'a> TraitDef<'a> { // struct_type is definitely not Unknown, since struct_def.fields // must be nonempty to reach here let pattern = if struct_type == Record { - let field_pats = subpats.into_iter().zip(ident_expr.iter()).map(|(pat, &(_, id, _, _))| { + let field_pats = subpats.into_iter().zip(ident_expr.iter()) + .map(|(pat, &(_, id, _, _))| { // id is guaranteed to be Some codemap::Spanned { span: pat.span, |
