diff options
| author | bors <bors@rust-lang.org> | 2016-08-24 14:57:34 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-24 14:57:34 -0700 |
| commit | e9bc1bac8c7664fb1b487879b3fbd56221f6a721 (patch) | |
| tree | 2a0739eb6851ceb45abcc38d7fe8d8ff18e71962 /src/libstd | |
| parent | 03e23c7f9a10b18e1687bfd92c6807e9342aa00b (diff) | |
| parent | 25cf8001b1352fdaccdd1d71071c941f99acc2a1 (diff) | |
Auto merge of #35764 - eddyb:byegone, r=nikomatsakis
Remove the old AST-based backend from rustc_trans. Starting with Rust 1.13, `--disable-orbit` , `-Z orbit=off` and `#[rustc_no_mir]` have been removed. Only the new MIR backend is left in the compiler, and only early const_eval uses ASTs from other crates. Filling drop (previously "zeroing drop"), `#[unsafe_no_drop_flag]` and associated unstable APIs are gone. Implementing `Drop` doesn't add a flag anymore to the type, all of the dynamic drop is function local. This is a [breaking-change], please use `Option::None` and/or `mem::forget` if you are unsure about your ability to prevent/control the drop of a value. In the future, `union` will be usable in some such cases. **NOTE**: DO NOT MERGE before we get the new beta as the stage0, there's some cruft to remove. All of this will massively simplify any efforts to implement (and as such it blocks) features such as `union`s, safe use of `#[packed]` or new type layout optimizations, not to mention many other experiments.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/collections/hash/table.rs | 4 | ||||
| -rw-r--r-- | src/libstd/lib.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs index 02931e5e389..8f02c9c7d3d 100644 --- a/src/libstd/collections/hash/table.rs +++ b/src/libstd/collections/hash/table.rs @@ -59,7 +59,7 @@ 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>>`. -#[unsafe_no_drop_flag] +#[cfg_attr(stage0, unsafe_no_drop_flag)] pub struct RawTable<K, V> { capacity: usize, size: usize, @@ -1042,7 +1042,7 @@ impl<K: Clone, V: Clone> Clone for RawTable<K, V> { impl<K, V> Drop for RawTable<K, V> { #[unsafe_destructor_blind_to_params] fn drop(&mut self) { - if self.capacity == 0 || self.capacity == mem::POST_DROP_USIZE { + if self.capacity == 0 { return; } diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index d4644a190f4..2b15f3dd945 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -275,7 +275,7 @@ #![feature(unboxed_closures)] #![feature(unicode)] #![feature(unique)] -#![feature(unsafe_no_drop_flag, filling_drop)] +#![cfg_attr(stage0, feature(unsafe_no_drop_flag))] #![feature(unwind_attributes)] #![feature(vec_push_all)] #![feature(zero_one)] |
