Skip to content

Commit

Permalink
syntax: revert the uint -> u32 "fix"; make the names/comment match.
Browse files Browse the repository at this point in the history
  • Loading branch information
huonw committed Jun 13, 2013
1 parent 5efaa4f commit 8b9f913
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libsyntax/ext/deriving/rand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ fn rand_substructure(cx: @ExtCtxt, span: span, substr: &Substructure) -> @expr {

let variant_count = cx.expr_uint(span, variants.len());

// need to specify the u32-ness of the random number
let u32_ty = cx.ty_ident(span, cx.ident_of("u32"));
// need to specify the uint-ness of the random number
let uint_ty = cx.ty_ident(span, cx.ident_of("uint"));
let r_ty = cx.ty_ident(span, cx.ident_of("R"));
let rand_name = cx.path_all(span, true, copy rand_ident, None, ~[ u32_ty, r_ty ]);
let rand_name = cx.path_all(span, true, copy rand_ident, None, ~[ uint_ty, r_ty ]);
let rand_name = cx.expr_path(rand_name);

// ::std::rand::Rand::rand::<u32>(rng)
// ::std::rand::Rand::rand::<uint>(rng)
let rv_call = cx.expr_call(span,
rand_name,
~[ rng[0].duplicate(cx) ]);
Expand Down

4 comments on commit 8b9f913

@bors
Copy link
Contributor

@bors bors commented on 8b9f913 Jun 13, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from pnkfelix
at huonw@8b9f913

@bors
Copy link
Contributor

@bors bors commented on 8b9f913 Jun 13, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging huonw/rust/rand-call = 8b9f913 into auto

@bors
Copy link
Contributor

@bors bors commented on 8b9f913 Jun 13, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huonw/rust/rand-call = 8b9f913 merged ok, testing candidate = 553c61db

@bors
Copy link
Contributor

@bors bors commented on 8b9f913 Jun 13, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.