File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed 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
875875used to create safe concepts on top of low-level code.
876876
877877~~~~
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};
880879
881880fn main() {
882881 unsafe {
@@ -909,9 +908,7 @@ The unsafe code from above can be contained behind a safe API that prevents
909908memory leaks or use-after-free:
910909
911910~~~~
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};
915912
916913struct Blob { priv ptr: *c_void }
917914
@@ -985,7 +982,9 @@ when it is collected.
985982
986983If an object doesn't contain garbage-collected boxes, it consists of a single
987984ownership 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.
989988
990989# Boxes
991990
You can’t perform that action at this time.
0 commit comments