ast::lit_int_unsuffixed(_) {
// An unsuffixed integer literal could have any integral type,
// so we create an integral type variable for it.
- ty::mk_var_integral(tcx, fcx.infcx.next_ty_var_integral_id());
-
- // FIXME: remove me when #1425 is finished.
- ty::mk_mach_int(tcx, ty_i)
+ ty::mk_var_integral(tcx, fcx.infcx.next_ty_var_integral_id())
}
ast::lit_float(_, t) { ty::mk_mach_float(tcx, t) }
ast::lit_nil { ty::mk_nil(tcx) }
--- /dev/null
+fn main() {
+ let x = 2;
+ let x_message = alt x {
+ 0 to 1 { "not many" }
+ _ { "lots" }
+ };
+ assert x_message == "lots";
+
+ let y = 2i;
+ let y_message = alt y {
+ 0 to 1 { "not many" }
+ _ { "lots" }
+ };
+ assert y_message == "lots";
+
+ let z = 1u64;
+ let z_message = alt z {
+ 0 to 1 { "not many" }
+ _ { "lots" }
+ };
+ assert z_message == "not many";
+}