@@ -170,7 +170,7 @@ pub struct Builder {
170
170
// A name for the thread-to-be, for identification in panic messages
171
171
name : Option < String > ,
172
172
// The size of the stack for the spawned thread
173
- stack_size : Option < uint > ,
173
+ stack_size : Option < usize > ,
174
174
// Thread-local stdout
175
175
stdout : Option < Box < Writer + Send + ' static > > ,
176
176
// Thread-local stderr
@@ -200,7 +200,7 @@ impl Builder {
200
200
201
201
/// Set the size of the stack for the new thread.
202
202
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
203
- pub fn stack_size ( mut self , size : uint ) -> Builder {
203
+ pub fn stack_size ( mut self , size : usize ) -> Builder {
204
204
self . stack_size = Some ( size) ;
205
205
self
206
206
}
@@ -283,8 +283,8 @@ impl Builder {
283
283
// address at which our stack started).
284
284
let main = move || {
285
285
let something_around_the_top_of_the_stack = 1 ;
286
- let addr = & something_around_the_top_of_the_stack as * const int ;
287
- let my_stack_top = addr as uint ;
286
+ let addr = & something_around_the_top_of_the_stack as * const isize ;
287
+ let my_stack_top = addr as usize ;
288
288
let my_stack_bottom = my_stack_top - stack_size + 1024 ;
289
289
unsafe {
290
290
stack:: record_os_managed_stack_bounds ( my_stack_bottom, my_stack_top) ;
@@ -779,7 +779,7 @@ mod test {
779
779
780
780
let ( tx, rx) = channel ( ) ;
781
781
782
- fn f ( i : int , tx : Sender < ( ) > ) {
782
+ fn f ( i : i32 , tx : Sender < ( ) > ) {
783
783
let tx = tx. clone ( ) ;
784
784
thread:: spawn ( move || {
785
785
if i == 0 {
@@ -808,13 +808,13 @@ mod test {
808
808
}
809
809
810
810
fn avoid_copying_the_body < F > ( spawnfn : F ) where F : FnOnce ( Thunk < ' static > ) {
811
- let ( tx, rx) = channel :: < uint > ( ) ;
811
+ let ( tx, rx) = channel :: < u32 > ( ) ;
812
812
813
813
let x = box 1 ;
814
- let x_in_parent = ( & * x) as * const int as uint ;
814
+ let x_in_parent = ( & * x) as * const isize as u32 ;
815
815
816
816
spawnfn ( Thunk :: new ( move || {
817
- let x_in_child = ( & * x) as * const int as uint ;
817
+ let x_in_child = ( & * x) as * const isize as u32 ;
818
818
tx. send ( x_in_child) . unwrap ( ) ;
819
819
} ) ) ;
820
820
@@ -853,8 +853,8 @@ mod test {
853
853
// climbing the task tree to dereference each ancestor. (See #1789)
854
854
// (well, it would if the constant were 8000+ - I lowered it to be more
855
855
// valgrind-friendly. try this at home, instead..!)
856
- static GENERATIONS : uint = 16 ;
857
- fn child_no ( x : uint ) -> Thunk < ' static > {
856
+ static GENERATIONS : usize = 16 ;
857
+ fn child_no ( x : usize ) -> Thunk < ' static > {
858
858
return Thunk :: new ( move || {
859
859
if x < GENERATIONS {
860
860
thread:: spawn ( move || child_no ( x+1 ) . invoke ( ( ) ) ) ;
0 commit comments