]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #22696 - stepancheg:use-box, r=alexcrichton
authorManish Goregaokar <manishsmail@gmail.com>
Mon, 23 Feb 2015 09:18:54 +0000 (14:48 +0530)
committerManish Goregaokar <manishsmail@gmail.com>
Mon, 23 Feb 2015 17:58:49 +0000 (23:28 +0530)
 e. g.

```
let b: Box<Foo> = Box::from_raw(p);
```

instead of

```
let b: Box<Foo> = mem::transmute(p);
```

Patch also changes closure release code in `src/libstd/sys/unix/thread.rs`
when `pthread_create` failed. Raw pointer was transmuted to box of
`FnOnce()` instead of `Thunk`. This code was probably never executed,
because `pthread_create` rarely fails.

(And there are two more patches in PR: fix typo in doc and mark `from_raw` and `into_raw` functions inline.)

1  2 
src/liblog/lib.rs

Simple merge