@@ -27,11 +27,11 @@ struct Newt<T>(T);
27
27
fn id < T > ( x : T ) -> T { x }
28
28
fn eq < T : Eq > ( a : T , b : T ) -> bool { a == b }
29
29
fn u8_as_i8 ( x : u8 ) -> i8 { x as i8 }
30
- fn odd ( x : uint ) -> bool { x % 2 == 1 }
30
+ fn odd ( x : usize ) -> bool { x % 2 == 1 }
31
31
fn dummy_rng ( ) -> DummyRng { DummyRng :: new_unseeded ( ) }
32
32
33
33
trait Size : Sized {
34
- fn size ( ) -> uint { std:: mem:: size_of :: < Self > ( ) }
34
+ fn size ( ) -> usize { std:: mem:: size_of :: < Self > ( ) }
35
35
}
36
36
impl < T > Size for T { }
37
37
@@ -47,24 +47,24 @@ macro_rules! tests {
47
47
48
48
tests ! {
49
49
// Free function.
50
- id, fn ( int ) -> int , ( 5 ) ;
51
- id:: <int >, fn ( int ) -> int , ( 5 ) ;
50
+ id, fn ( i32 ) -> i32 , ( 5 ) ;
51
+ id:: <i32 >, fn ( i32 ) -> i32 , ( 5 ) ;
52
52
53
53
// Enum variant constructor.
54
- Some , fn ( int ) -> Option <int >, ( 5 ) ;
55
- Some :: <int >, fn ( int ) -> Option <int >, ( 5 ) ;
54
+ Some , fn ( i32 ) -> Option <i32 >, ( 5 ) ;
55
+ Some :: <i32 >, fn ( i32 ) -> Option <i32 >, ( 5 ) ;
56
56
57
57
// Tuple struct constructor.
58
- Newt , fn ( int ) -> Newt <int >, ( 5 ) ;
59
- Newt :: <int >, fn ( int ) -> Newt <int >, ( 5 ) ;
58
+ Newt , fn ( i32 ) -> Newt <i32 >, ( 5 ) ;
59
+ Newt :: <i32 >, fn ( i32 ) -> Newt <i32 >, ( 5 ) ;
60
60
61
61
// Inherent static methods.
62
62
Vec :: new, fn ( ) -> Vec <( ) >, ( ) ;
63
63
Vec :: <( ) >:: new, fn ( ) -> Vec <( ) >, ( ) ;
64
- Vec :: with_capacity, fn ( uint ) -> Vec <( ) >, ( 5 ) ;
65
- Vec :: <( ) >:: with_capacity, fn ( uint ) -> Vec <( ) >, ( 5 ) ;
66
- BitVec :: from_fn, fn ( uint , fn ( uint ) -> bool ) -> BitVec , ( 5 , odd) ;
67
- BitVec :: from_fn:: <fn ( uint ) -> bool >, fn ( uint , fn ( uint ) -> bool ) -> BitVec , ( 5 , odd) ;
64
+ Vec :: with_capacity, fn ( usize ) -> Vec <( ) >, ( 5 ) ;
65
+ Vec :: <( ) >:: with_capacity, fn ( usize ) -> Vec <( ) >, ( 5 ) ;
66
+ BitVec :: from_fn, fn ( usize , fn ( usize ) -> bool ) -> BitVec , ( 5 , odd) ;
67
+ BitVec :: from_fn:: <fn ( usize ) -> bool >, fn ( usize , fn ( usize ) -> bool ) -> BitVec , ( 5 , odd) ;
68
68
69
69
// Inherent non-static method.
70
70
Vec :: map_in_place, fn ( Vec <u8 >, fn ( u8 ) -> i8 ) -> Vec <i8 >, ( vec![ b'f' , b'o' , b'o' ] , u8_as_i8) ;
@@ -77,34 +77,34 @@ tests! {
77
77
// , (vec![b'f', b'o', b'o'], u8_as_i8);
78
78
79
79
// Trait static methods.
80
- bool :: size, fn ( ) -> uint , ( ) ;
81
- <bool as Size >:: size, fn ( ) -> uint , ( ) ;
80
+ bool :: size, fn ( ) -> usize , ( ) ;
81
+ <bool as Size >:: size, fn ( ) -> usize , ( ) ;
82
82
83
- Default :: default , fn ( ) -> int , ( ) ;
84
- int :: default , fn ( ) -> int , ( ) ;
85
- <int as Default >:: default , fn ( ) -> int , ( ) ;
83
+ Default :: default , fn ( ) -> i32 , ( ) ;
84
+ i32 :: default , fn ( ) -> i32 , ( ) ;
85
+ <i32 as Default >:: default , fn ( ) -> i32 , ( ) ;
86
86
87
- Rand :: rand, fn ( & mut DummyRng ) -> int , ( & mut dummy_rng( ) ) ;
88
- int :: rand, fn ( & mut DummyRng ) -> int , ( & mut dummy_rng( ) ) ;
89
- <int as Rand >:: rand, fn ( & mut DummyRng ) -> int , ( & mut dummy_rng( ) ) ;
90
- Rand :: rand:: <DummyRng >, fn ( & mut DummyRng ) -> int , ( & mut dummy_rng( ) ) ;
91
- int :: rand:: <DummyRng >, fn ( & mut DummyRng ) -> int , ( & mut dummy_rng( ) ) ;
92
- <int as Rand >:: rand:: <DummyRng >, fn ( & mut DummyRng ) -> int , ( & mut dummy_rng( ) ) ;
87
+ Rand :: rand, fn ( & mut DummyRng ) -> i32 , ( & mut dummy_rng( ) ) ;
88
+ i32 :: rand, fn ( & mut DummyRng ) -> i32 , ( & mut dummy_rng( ) ) ;
89
+ <i32 as Rand >:: rand, fn ( & mut DummyRng ) -> i32 , ( & mut dummy_rng( ) ) ;
90
+ Rand :: rand:: <DummyRng >, fn ( & mut DummyRng ) -> i32 , ( & mut dummy_rng( ) ) ;
91
+ i32 :: rand:: <DummyRng >, fn ( & mut DummyRng ) -> i32 , ( & mut dummy_rng( ) ) ;
92
+ <i32 as Rand >:: rand:: <DummyRng >, fn ( & mut DummyRng ) -> i32 , ( & mut dummy_rng( ) ) ;
93
93
94
94
// Trait non-static methods.
95
- Clone :: clone, fn ( & int ) -> int , ( & 5 ) ;
96
- int :: clone, fn ( & int ) -> int , ( & 5 ) ;
97
- <int as Clone >:: clone, fn ( & int ) -> int , ( & 5 ) ;
95
+ Clone :: clone, fn ( & i32 ) -> i32 , ( & 5 ) ;
96
+ i32 :: clone, fn ( & i32 ) -> i32 , ( & 5 ) ;
97
+ <i32 as Clone >:: clone, fn ( & i32 ) -> i32 , ( & 5 ) ;
98
98
99
- FromIterator :: from_iter, fn ( OptionIter <int >) -> Vec <int >, ( Some ( 5 ) . into_iter( ) ) ;
100
- Vec :: from_iter, fn ( OptionIter <int >) -> Vec <int >, ( Some ( 5 ) . into_iter( ) ) ;
101
- <Vec <_> as FromIterator <_>>:: from_iter, fn ( OptionIter <int >) -> Vec <int >,
99
+ FromIterator :: from_iter, fn ( OptionIter <i32 >) -> Vec <i32 >, ( Some ( 5 ) . into_iter( ) ) ;
100
+ Vec :: from_iter, fn ( OptionIter <i32 >) -> Vec <i32 >, ( Some ( 5 ) . into_iter( ) ) ;
101
+ <Vec <_> as FromIterator <_>>:: from_iter, fn ( OptionIter <i32 >) -> Vec <i32 >,
102
102
( Some ( 5 ) . into_iter( ) ) ;
103
- <Vec <int > as FromIterator <_>>:: from_iter, fn ( OptionIter <int >) -> Vec <int >,
103
+ <Vec <i32 > as FromIterator <_>>:: from_iter, fn ( OptionIter <i32 >) -> Vec <i32 >,
104
104
( Some ( 5 ) . into_iter( ) ) ;
105
- FromIterator :: from_iter:: <OptionIter <int >>, fn ( OptionIter <int >) -> Vec <int >,
105
+ FromIterator :: from_iter:: <OptionIter <i32 >>, fn ( OptionIter <i32 >) -> Vec <i32 >,
106
106
( Some ( 5 ) . into_iter( ) ) ;
107
- <Vec <int > as FromIterator <_>>:: from_iter:: <OptionIter <int >>, fn ( OptionIter <int >) -> Vec <int >,
107
+ <Vec <i32 > as FromIterator <_>>:: from_iter:: <OptionIter <i32 >>, fn ( OptionIter <i32 >) -> Vec <i32 >,
108
108
( Some ( 5 ) . into_iter( ) ) ;
109
109
110
110
Add :: add, fn ( i32 , i32 ) -> i32 , ( 5 , 6 ) ;
0 commit comments