Skip to content

Commit dc1ba08

Browse files
huonwnikomatsakis
authored andcommitted
Test fixes.
1 parent 441044f commit dc1ba08

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

src/libsyntax/ext/deriving/rand.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ fn rand_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructure)
9898
rand_name,
9999
vec!(rng.clone()));
100100

101-
// need to specify the uint-ness of the random number
102-
let uint_ty = cx.ty_ident(trait_span, cx.ident_of("uint"));
101+
// need to specify the usize-ness of the random number
102+
let usize_ty = cx.ty_ident(trait_span, cx.ident_of("usize"));
103103
let value_ident = cx.ident_of("__value");
104104
let let_statement = cx.stmt_let_typed(trait_span,
105105
false,
106106
value_ident,
107-
uint_ty,
107+
usize_ty,
108108
rv_call);
109109

110110
// rand() % variants.len()

src/libsyntax/feature_gate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
355355
Some("the `int` type is deprecated; \
356356
use `isize` or a fixed-sized integer")
357357
} else if name == "uint" {
358-
Some("the `unt` type is deprecated; \
358+
Some("the `uint` type is deprecated; \
359359
use `usize` or a fixed-sized integer")
360360
} else {
361361
None

src/test/compile-fail/feature-gate-int-uint.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
#![allow(dead_code)]
1212

1313
mod u {
14-
type X = usize; //~ WARN the `usize` type is deprecated
14+
type X = uint; //~ WARN the `uint` type is deprecated
1515
struct Foo {
16-
x: usize //~ WARN the `usize` type is deprecated
16+
x: uint //~ WARN the `uint` type is deprecated
1717
}
18-
fn bar(x: usize) { //~ WARN the `usize` type is deprecated
19-
1us; //~ WARN the `u` suffix on integers is deprecated
18+
fn bar(x: uint) { //~ WARN the `uint` type is deprecated
19+
1u; //~ WARN the `u` suffix on integers is deprecated
2020
}
2121
}
2222
mod i {
23-
type X = isize; //~ WARN the `isize` type is deprecated
23+
type X = int; //~ WARN the `int` type is deprecated
2424
struct Foo {
25-
x: isize //~ WARN the `isize` type is deprecated
25+
x: int //~ WARN the `int` type is deprecated
2626
}
27-
fn bar(x: isize) { //~ WARN the `isize` type is deprecated
28-
1is; //~ WARN the `u` suffix on integers is deprecated
27+
fn bar(x: int) { //~ WARN the `int` type is deprecated
28+
1i; //~ WARN the `i` suffix on integers is deprecated
2929
}
3030
}
3131

src/test/compile-fail/issue-13482-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn main() {
1414
let x = [1,2];
1515
let y = match x {
1616
[] => None,
17-
//~^ ERROR types: expected `[_#0is; 2]`, found `[_#7t; 0]`
17+
//~^ ERROR types: expected `[_#0i; 2]`, found `[_#7t; 0]`
1818
// (expected array of 2 elements, found array of 0 elements)
1919
[a,_] => Some(a)
2020
};

src/test/compile-fail/issue-5544-a.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010

1111
fn main() {
1212
let _i = 18446744073709551616; // 2^64
13-
//~^ ERROR isize literal is too large
13+
//~^ ERROR int literal is too large
1414
}

src/test/compile-fail/lex-bad-numeric-literals.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ fn main() {
2121
0o; //~ ERROR: no valid digits
2222
1e+; //~ ERROR: expected at least one digit in exponent
2323
0x539.0; //~ ERROR: hexadecimal float literal is not supported
24-
99999999999999999999999999999999; //~ ERROR: isize literal is too large
25-
99999999999999999999999999999999u32; //~ ERROR: isize literal is too large
24+
99999999999999999999999999999999; //~ ERROR: int literal is too large
25+
99999999999999999999999999999999u32; //~ ERROR: int literal is too large
2626
0x; //~ ERROR: no valid digits
2727
0xu32; //~ ERROR: no valid digits
2828
0ou32; //~ ERROR: no valid digits

src/test/compile-fail/lint-type-limits.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ fn qux() {
5050
}
5151

5252
fn quy() {
53-
let i = -23us; //~ WARNING negation of unsigned isize literal may be unintentional
53+
let i = -23us; //~ WARNING negation of unsigned int literal may be unintentional
5454
//~^ WARNING unused variable
5555
}
5656

5757
fn quz() {
5858
let i = 23us;
59-
let j = -i; //~ WARNING negation of unsigned isize variable may be unintentional
59+
let j = -i; //~ WARNING negation of unsigned int variable may be unintentional
6060
//~^ WARNING unused variable
6161
}

src/test/compile-fail/oversized-literal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
// except according to those terms.
1010

1111
fn main() {
12-
println!("{}", 18446744073709551616u64); //~ error: isize literal is too large
12+
println!("{}", 18446744073709551616u64); //~ error: int literal is too large
1313
}

0 commit comments

Comments
 (0)