Skip to content

Commit 415c42e

Browse files
committed
Rollup merge of #22982 - tbu-:pr_fixup_22510, r=Manishearth
r? @Manishearth
2 parents 2e15a7d + d18897c commit 415c42e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: src/libstd/thread.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ impl Builder {
277277
// address at which our stack started).
278278
let main = move || {
279279
let something_around_the_top_of_the_stack = 1;
280-
let addr = &something_around_the_top_of_the_stack as *const isize;
280+
let addr = &something_around_the_top_of_the_stack as *const i32;
281281
let my_stack_top = addr as usize;
282282
let my_stack_bottom = my_stack_top - stack_size + 1024;
283283
unsafe {
@@ -802,13 +802,13 @@ mod test {
802802
}
803803

804804
fn avoid_copying_the_body<F>(spawnfn: F) where F: FnOnce(Thunk<'static>) {
805-
let (tx, rx) = channel::<u32>();
805+
let (tx, rx) = channel();
806806

807807
let x = box 1;
808-
let x_in_parent = (&*x) as *const isize as u32;
808+
let x_in_parent = (&*x) as *const i32 as usize;
809809

810810
spawnfn(Thunk::new(move|| {
811-
let x_in_child = (&*x) as *const isize as u32;
811+
let x_in_child = (&*x) as *const i32 as usize;
812812
tx.send(x_in_child).unwrap();
813813
}));
814814

@@ -847,8 +847,8 @@ mod test {
847847
// climbing the task tree to dereference each ancestor. (See #1789)
848848
// (well, it would if the constant were 8000+ - I lowered it to be more
849849
// valgrind-friendly. try this at home, instead..!)
850-
const GENERATIONS: usize = 16;
851-
fn child_no(x: usize) -> Thunk<'static> {
850+
const GENERATIONS: u32 = 16;
851+
fn child_no(x: u32) -> Thunk<'static> {
852852
return Thunk::new(move|| {
853853
if x < GENERATIONS {
854854
thread::spawn(move|| child_no(x+1).invoke(()));

0 commit comments

Comments
 (0)