diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-03 14:17:32 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-03 17:02:24 +0530 |
| commit | 415c42ecc4aa425d71821b5807569937aca3128c (patch) | |
| tree | bc906601d099a808cac9357178385532996c173b /src/libstd | |
| parent | 2e15a7d92e622f9f7d90aeab331fe8abb3089ce6 (diff) | |
| parent | d18897cadfe243591bac2c606d63ce37449d5257 (diff) | |
| download | rust-415c42ecc4aa425d71821b5807569937aca3128c.tar.gz rust-415c42ecc4aa425d71821b5807569937aca3128c.zip | |
Rollup merge of #22982 - tbu-:pr_fixup_22510, r=Manishearth
r? @Manishearth
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/thread.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/thread.rs b/src/libstd/thread.rs index 0f0bca5e8b2..e8330820906 100644 --- a/src/libstd/thread.rs +++ b/src/libstd/thread.rs @@ -277,7 +277,7 @@ impl Builder { // address at which our stack started). let main = move || { let something_around_the_top_of_the_stack = 1; - let addr = &something_around_the_top_of_the_stack as *const isize; + let addr = &something_around_the_top_of_the_stack as *const i32; let my_stack_top = addr as usize; let my_stack_bottom = my_stack_top - stack_size + 1024; unsafe { @@ -802,13 +802,13 @@ mod test { } fn avoid_copying_the_body<F>(spawnfn: F) where F: FnOnce(Thunk<'static>) { - let (tx, rx) = channel::<u32>(); + let (tx, rx) = channel(); let x = box 1; - let x_in_parent = (&*x) as *const isize as u32; + let x_in_parent = (&*x) as *const i32 as usize; spawnfn(Thunk::new(move|| { - let x_in_child = (&*x) as *const isize as u32; + let x_in_child = (&*x) as *const i32 as usize; tx.send(x_in_child).unwrap(); })); @@ -847,8 +847,8 @@ mod test { // climbing the task tree to dereference each ancestor. (See #1789) // (well, it would if the constant were 8000+ - I lowered it to be more // valgrind-friendly. try this at home, instead..!) - const GENERATIONS: usize = 16; - fn child_no(x: usize) -> Thunk<'static> { + const GENERATIONS: u32 = 16; + fn child_no(x: u32) -> Thunk<'static> { return Thunk::new(move|| { if x < GENERATIONS { thread::spawn(move|| child_no(x+1).invoke(())); |
