File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 5f13e9ccc2e3328d4cd8ca49f84e6840dd998346
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: f7a2371c176663d59062ec5158f39faecba45768
5
- refs/heads/try: b05e148dc954d7c1fb4666d4529653993a93eb1d
5
+ refs/heads/try: d98a195ffc6f68cf071826917e50eb4ad80b270b
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
Original file line number Diff line number Diff line change @@ -875,8 +875,7 @@ the compiler that unsafety does not leak outside of the unsafe block, and is
875
875
used to create safe concepts on top of low-level code.
876
876
877
877
~~~~
878
- use core::libc::funcs::c95::stdlib::{calloc, free};
879
- use core::libc::types::os::arch::c95::size_t;
878
+ use core::libc::{calloc, free, size_t};
880
879
881
880
fn main() {
882
881
unsafe {
@@ -909,9 +908,7 @@ The unsafe code from above can be contained behind a safe API that prevents
909
908
memory leaks or use-after-free:
910
909
911
910
~~~~
912
- use core::libc::funcs::c95::stdlib::{calloc, free};
913
- use core::libc::types::common::c95::c_void;
914
- use core::libc::types::os::arch::c95::size_t;
911
+ use core::libc::{calloc, free, c_void, size_t};
915
912
916
913
struct Blob { priv ptr: *c_void }
917
914
@@ -985,7 +982,9 @@ when it is collected.
985
982
986
983
If an object doesn't contain garbage-collected boxes, it consists of a single
987
984
ownership tree and is given the ` Owned ` trait which allows it to be sent
988
- between tasks.
985
+ between tasks. Custom destructors can only be implemented directly on types
986
+ that are ` Owned ` , but garbage-collected boxes can still * contain* types with
987
+ custom destructors.
989
988
990
989
# Boxes
991
990
You can’t perform that action at this time.
0 commit comments