]> git.lizzy.rs Git - rust.git/commitdiff
drop_in_place is stable now, don't #![feature] it in the nomicon and a test
authorest31 <MTest31@outlook.com>
Thu, 26 Jan 2017 09:37:20 +0000 (10:37 +0100)
committerest31 <MTest31@outlook.com>
Thu, 26 Jan 2017 09:38:22 +0000 (10:38 +0100)
It was stable since Rust 1.8.

src/doc/nomicon/destructors.md
src/test/run-pass/extern_fat_drop.rs

index c6fa5b079db02343b4e3a13997dc030795f68cc4..be4730cf8bce627fdb6e81c9993dd26dc05da3bf 100644 (file)
@@ -26,7 +26,7 @@ this is totally fine.
 For instance, a custom implementation of `Box` might write `Drop` like this:
 
 ```rust
-#![feature(alloc, heap_api, drop_in_place, unique)]
+#![feature(alloc, heap_api, unique)]
 
 extern crate alloc;
 
@@ -57,7 +57,7 @@ use-after-free the `ptr` because when drop exits, it becomes inaccessible.
 However this wouldn't work:
 
 ```rust
-#![feature(alloc, heap_api, drop_in_place, unique)]
+#![feature(alloc, heap_api, unique)]
 
 extern crate alloc;
 
@@ -135,7 +135,7 @@ The classic safe solution to overriding recursive drop and allowing moving out
 of Self during `drop` is to use an Option:
 
 ```rust
-#![feature(alloc, heap_api, drop_in_place, unique)]
+#![feature(alloc, heap_api, unique)]
 
 extern crate alloc;
 
index deb7e6bd53986048f873df8d26831015d5297bc6..8ce1f744dee17c73829987eee2be79679aafa8dc 100644 (file)
@@ -10,8 +10,6 @@
 
 // aux-build:fat_drop.rs
 
-#![feature(drop_in_place)]
-
 extern crate fat_drop;
 
 fn main() {