Skip to content

Commit 4764851

Browse files
committed
---
yaml --- r: 206327 b: refs/heads/beta c: 5892b40 h: refs/heads/master i: 206325: 385670b 206323: c67a6e8 206319: d6723ee v: v3
1 parent 31ac56e commit 4764851

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2929
refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3030
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3131
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
32-
refs/heads/beta: 4957ecce3ede95c4415dbcc7a136f9d4ebd5cb4e
32+
refs/heads/beta: 5892b40859b65dd520ae92f7570069adaf313a8f
3333
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3434
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3535
refs/heads/tmp: 579e31929feff51dcaf8d444648eff8de735f91a

branches/beta/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
}

branches/beta/src/libsyntax/ext/deriving/generic/mod.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ impl<'a> TraitDef<'a> {
380380
pub fn expand(&self,
381381
cx: &mut ExtCtxt,
382382
mitem: &ast::MetaItem,
383-
item: &'a ast::Item,
383+
item: &'a ast::Item,
384384
push: &mut FnMut(P<ast::Item>))
385385
{
386386
let newitem = match item.node {
@@ -1407,7 +1407,9 @@ impl<'a> TraitDef<'a> {
14071407
struct_def: &'a StructDef,
14081408
prefix: &str,
14091409
mutbl: ast::Mutability)
1410-
-> (P<ast::Pat>, Vec<(Span, Option<Ident>, P<Expr>, &'a [ast::Attribute])>) {
1410+
-> (P<ast::Pat>, Vec<(Span, Option<Ident>,
1411+
P<Expr>,
1412+
&'a [ast::Attribute])>) {
14111413
if struct_def.fields.is_empty() {
14121414
return (cx.pat_enum(self.span, struct_path, vec![]), vec![]);
14131415
}
@@ -1445,7 +1447,8 @@ impl<'a> TraitDef<'a> {
14451447
// struct_type is definitely not Unknown, since struct_def.fields
14461448
// must be nonempty to reach here
14471449
let pattern = if struct_type == Record {
1448-
let field_pats = subpats.into_iter().zip(ident_expr.iter()).map(|(pat, &(_, id, _, _))| {
1450+
let field_pats = subpats.into_iter().zip(ident_expr.iter())
1451+
.map(|(pat, &(_, id, _, _))| {
14491452
// id is guaranteed to be Some
14501453
codemap::Spanned {
14511454
span: pat.span,

branches/beta/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,

branches/beta/src/test/auxiliary/custom_derive_plugin_attr.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,14 @@ fn expand(cx: &mut ExtCtxt,
6666

6767
// Mostly copied from syntax::ext::deriving::hash
6868
/// Defines how the implementation for `trace()` is to be generated
69-
fn totalsum_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructure) -> P<ast::Expr> {
69+
fn totalsum_substructure(cx: &mut ExtCtxt, trait_span: Span,
70+
substr: &Substructure) -> P<ast::Expr> {
7071
let fields = match *substr.fields {
7172
Struct(ref fs) | EnumMatching(_, _, ref fs) => fs,
7273
_ => cx.span_bug(trait_span, "impossible substructure")
7374
};
7475

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

0 commit comments

Comments
 (0)