about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-09-28 21:55:15 -0700
committerGitHub <noreply@github.com>2016-09-28 21:55:15 -0700
commit91f34c0c70746f5c938d25d02a8a66b41240b2f0 (patch)
tree5181cf125d06fbb10f8a3d2271003dce4a9f8b62 /src/libstd
parenteee2d04d877fe909309c39b6bdf711dc586d0a1e (diff)
parentf12f9504b33b3e98952bc2bbca41fe0b81fac6fe (diff)
downloadrust-91f34c0c70746f5c938d25d02a8a66b41240b2f0.tar.gz
rust-91f34c0c70746f5c938d25d02a8a66b41240b2f0.zip
Auto merge of #36818 - jonathandturner:rollup, r=jonathandturner
Rollup of 12 pull requests

- Successful merges: #35286, #35892, #36460, #36704, #36741, #36760, #36787, #36789, #36794, #36803, #36811, #36813
- Failed merges:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/hash/table.rs1
-rw-r--r--src/libstd/ffi/c_str.rs4
-rw-r--r--src/libstd/lib.rs1
3 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs
index 8f02c9c7d3d..afd833d8bdd 100644
--- a/src/libstd/collections/hash/table.rs
+++ b/src/libstd/collections/hash/table.rs
@@ -59,7 +59,6 @@ const EMPTY_BUCKET: u64 = 0;
 /// around just the "table" part of the hashtable. It enforces some
 /// invariants at the type level and employs some performance trickery,
 /// but in general is just a tricked out `Vec<Option<u64, K, V>>`.
-#[cfg_attr(stage0, unsafe_no_drop_flag)]
 pub struct RawTable<K, V> {
     capacity: usize,
     size: usize,
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs
index d6a5efbd279..6f5ce350e6c 100644
--- a/src/libstd/ffi/c_str.rs
+++ b/src/libstd/ffi/c_str.rs
@@ -314,9 +314,11 @@ impl CString {
 }
 
 // Turns this `CString` into an empty string to prevent
-// memory unsafe code from working by accident.
+// memory unsafe code from working by accident. Inline
+// to prevent LLVM from optimizing it away in debug builds.
 #[stable(feature = "cstring_drop", since = "1.13.0")]
 impl Drop for CString {
+    #[inline]
     fn drop(&mut self) {
         unsafe { *self.inner.get_unchecked_mut(0) = 0; }
     }
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 912045453e0..b3e4351e9b2 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -278,7 +278,6 @@
 #![feature(unboxed_closures)]
 #![feature(unicode)]
 #![feature(unique)]
-#![cfg_attr(stage0, feature(unsafe_no_drop_flag))]
 #![feature(unwind_attributes)]
 #![feature(vec_push_all)]
 #![feature(zero_one)]