Skip to content

Commit b1448bf

Browse files
committed
Rename AstBuilder::expr_int -> AstBuilder::expr_isize
1 parent 4957ecc commit b1448bf

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/libsyntax/ext/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ pub trait AstBuilder {
146146
fn expr_lit(&self, sp: Span, lit: ast::Lit_) -> P<ast::Expr>;
147147

148148
fn expr_usize(&self, span: Span, i: usize) -> P<ast::Expr>;
149-
fn expr_int(&self, sp: Span, i: isize) -> P<ast::Expr>;
149+
fn expr_isize(&self, sp: Span, i: isize) -> P<ast::Expr>;
150150
fn expr_u8(&self, sp: Span, u: u8) -> P<ast::Expr>;
151151
fn expr_u32(&self, sp: Span, u: u32) -> P<ast::Expr>;
152152
fn expr_bool(&self, sp: Span, value: bool) -> P<ast::Expr>;
@@ -698,7 +698,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
698698
fn expr_usize(&self, span: Span, i: usize) -> P<ast::Expr> {
699699
self.expr_lit(span, ast::LitInt(i as u64, ast::UnsignedIntLit(ast::TyUs)))
700700
}
701-
fn expr_int(&self, sp: Span, i: isize) -> P<ast::Expr> {
701+
fn expr_isize(&self, sp: Span, i: isize) -> P<ast::Expr> {
702702
self.expr_lit(sp, ast::LitInt(i as u64, ast::SignedIntLit(ast::TyIs,
703703
ast::Sign::new(i))))
704704
}

src/test/auxiliary/custom_derive_plugin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fn expand(cx: &mut ExtCtxt,
5555
ret_ty: Literal(Path::new_local("isize")),
5656
attributes: vec![],
5757
combine_substructure: combine_substructure(box |cx, span, substr| {
58-
let zero = cx.expr_int(span, 0);
58+
let zero = cx.expr_isize(span, 0);
5959
cs_fold(false,
6060
|cx, span, subexpr, field, _| {
6161
cx.expr_binary(span, ast::BiAdd, subexpr,

src/test/auxiliary/custom_derive_plugin_attr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ fn totalsum_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructu
7272
_ => cx.span_bug(trait_span, "impossible substructure")
7373
};
7474

75-
fields.iter().fold(cx.expr_int(trait_span, 0), |acc, ref item| {
75+
fields.iter().fold(cx.expr_isize(trait_span, 0), |acc, ref item| {
7676
if item.attrs.iter().find(|a| a.check_name("ignore")).is_some() {
7777
acc
7878
} else {

0 commit comments

Comments
 (0)