Skip to content

Commit c48b499

Browse files
committed
Auto merge of #24888 - tamird:snapshot, r=alexcrichton
r? @alexcrichton cc @brson
2 parents c4b23ae + 69abc12 commit c48b499

File tree

89 files changed

+29
-397
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+29
-397
lines changed

src/liballoc/arc.rs

-2
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@ impl<T: Clone> Arc<T> {
355355
}
356356
}
357357

358-
#[unsafe_destructor]
359358
#[stable(feature = "rust1", since = "1.0.0")]
360359
impl<T> Drop for Arc<T> {
361360
/// Drops the `Arc<T>`.
@@ -489,7 +488,6 @@ impl<T> Clone for Weak<T> {
489488
}
490489
}
491490

492-
#[unsafe_destructor]
493491
#[stable(feature = "rust1", since = "1.0.0")]
494492
impl<T> Drop for Weak<T> {
495493
/// Drops the `Weak<T>`.

src/liballoc/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
#![feature(allocator)]
7474
#![feature(custom_attribute)]
7575
#![feature(fundamental)]
76-
#![feature(lang_items, unsafe_destructor)]
76+
#![feature(lang_items)]
7777
#![feature(box_syntax)]
7878
#![feature(optin_builtin_traits)]
7979
#![feature(unboxed_closures)]

src/liballoc/rc.rs

-2
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,6 @@ impl<T> Deref for Rc<T> {
375375
}
376376
}
377377

378-
#[unsafe_destructor]
379378
#[stable(feature = "rust1", since = "1.0.0")]
380379
impl<T> Drop for Rc<T> {
381380
/// Drops the `Rc<T>`.
@@ -693,7 +692,6 @@ impl<T> Weak<T> {
693692
}
694693
}
695694

696-
#[unsafe_destructor]
697695
#[stable(feature = "rust1", since = "1.0.0")]
698696
impl<T> Drop for Weak<T> {
699697
/// Drops the `Weak<T>`.

src/libarena/lib.rs

-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#![feature(core)]
3636
#![feature(staged_api)]
3737
#![feature(unboxed_closures)]
38-
#![feature(unsafe_destructor)]
3938
#![cfg_attr(test, feature(test))]
4039

4140
extern crate alloc;
@@ -124,7 +123,6 @@ fn chunk(size: usize, is_copy: bool) -> Chunk {
124123
}
125124
}
126125

127-
#[unsafe_destructor]
128126
impl<'longer_than_self> Drop for Arena<'longer_than_self> {
129127
fn drop(&mut self) {
130128
unsafe {
@@ -510,7 +508,6 @@ impl<T> TypedArena<T> {
510508
}
511509
}
512510

513-
#[unsafe_destructor]
514511
impl<T> Drop for TypedArena<T> {
515512
fn drop(&mut self) {
516513
unsafe {

src/libcollections/btree/node.rs

-3
Original file line numberDiff line numberDiff line change
@@ -270,14 +270,12 @@ impl<T> DoubleEndedIterator for RawItems<T> {
270270
}
271271
}
272272

273-
#[unsafe_destructor]
274273
impl<T> Drop for RawItems<T> {
275274
fn drop(&mut self) {
276275
for _ in self.by_ref() {}
277276
}
278277
}
279278

280-
#[unsafe_destructor]
281279
impl<K, V> Drop for Node<K, V> {
282280
fn drop(&mut self) {
283281
if self.keys.is_null() ||
@@ -1394,7 +1392,6 @@ impl<K, V> TraversalImpl for MoveTraversalImpl<K, V> {
13941392
}
13951393
}
13961394

1397-
#[unsafe_destructor]
13981395
impl<K, V> Drop for MoveTraversalImpl<K, V> {
13991396
fn drop(&mut self) {
14001397
// We need to cleanup the stored values manually, as the RawItems destructor would run

src/libcollections/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#![feature(staged_api)]
3434
#![feature(unboxed_closures)]
3535
#![feature(unicode)]
36-
#![feature(unsafe_destructor)]
3736
#![feature(unique)]
3837
#![feature(unsafe_no_drop_flag, filling_drop)]
3938
#![feature(step_by)]

src/libcollections/linked_list.rs

-1
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,6 @@ impl<T> LinkedList<T> {
624624
}
625625
}
626626

627-
#[unsafe_destructor]
628627
#[stable(feature = "rust1", since = "1.0.0")]
629628
impl<T> Drop for LinkedList<T> {
630629
fn drop(&mut self) {

src/libcollections/vec.rs

-6
Original file line numberDiff line numberDiff line change
@@ -1626,7 +1626,6 @@ impl<'a, T: Clone> Add<&'a [T]> for Vec<T> {
16261626
}
16271627
}
16281628

1629-
#[unsafe_destructor]
16301629
#[stable(feature = "rust1", since = "1.0.0")]
16311630
impl<T> Drop for Vec<T> {
16321631
fn drop(&mut self) {
@@ -1808,7 +1807,6 @@ impl<T> DoubleEndedIterator for IntoIter<T> {
18081807
#[stable(feature = "rust1", since = "1.0.0")]
18091808
impl<T> ExactSizeIterator for IntoIter<T> {}
18101809

1811-
#[unsafe_destructor]
18121810
#[stable(feature = "rust1", since = "1.0.0")]
18131811
impl<T> Drop for IntoIter<T> {
18141812
fn drop(&mut self) {
@@ -1867,7 +1865,6 @@ impl<'a, T> DoubleEndedIterator for Drain<'a, T> {
18671865
}
18681866
}
18691867

1870-
#[unsafe_destructor]
18711868
#[stable(feature = "rust1", since = "1.0.0")]
18721869
impl<'a, T> Drop for Drain<'a, T> {
18731870
fn drop(&mut self) {
@@ -1914,7 +1911,6 @@ impl<'a, T> Deref for DerefVec<'a, T> {
19141911
}
19151912

19161913
// Prevent the inner `Vec<T>` from attempting to deallocate memory.
1917-
#[unsafe_destructor]
19181914
#[stable(feature = "rust1", since = "1.0.0")]
19191915
impl<'a, T> Drop for DerefVec<'a, T> {
19201916
fn drop(&mut self) {
@@ -1983,7 +1979,6 @@ struct PartialVecZeroSized<T,U> {
19831979
marker: PhantomData<::core::cell::Cell<(T,U)>>,
19841980
}
19851981

1986-
#[unsafe_destructor]
19871982
impl<T,U> Drop for PartialVecNonZeroSized<T,U> {
19881983
fn drop(&mut self) {
19891984
unsafe {
@@ -2009,7 +2004,6 @@ impl<T,U> Drop for PartialVecNonZeroSized<T,U> {
20092004
}
20102005
}
20112006

2012-
#[unsafe_destructor]
20132007
impl<T,U> Drop for PartialVecZeroSized<T,U> {
20142008
fn drop(&mut self) {
20152009
unsafe {

src/libcollections/vec_deque.rs

-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ impl<T: Clone> Clone for VecDeque<T> {
5959
}
6060
}
6161

62-
#[unsafe_destructor]
6362
#[stable(feature = "rust1", since = "1.0.0")]
6463
impl<T> Drop for VecDeque<T> {
6564
fn drop(&mut self) {
@@ -1612,7 +1611,6 @@ pub struct Drain<'a, T: 'a> {
16121611
inner: &'a mut VecDeque<T>,
16131612
}
16141613

1615-
#[unsafe_destructor]
16161614
#[stable(feature = "rust1", since = "1.0.0")]
16171615
impl<'a, T: 'a> Drop for Drain<'a, T> {
16181616
fn drop(&mut self) {

src/libcollectionstest/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#![feature(test)]
1919
#![feature(unboxed_closures)]
2020
#![feature(unicode)]
21-
#![feature(unsafe_destructor)]
2221
#![feature(into_cow)]
2322
#![feature(step_by)]
2423
#![cfg_attr(test, feature(str_char))]

src/libcollectionstest/vec.rs

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ struct DropCounter<'a> {
1818
count: &'a mut u32
1919
}
2020

21-
#[unsafe_destructor]
2221
impl<'a> Drop for DropCounter<'a> {
2322
fn drop(&mut self) {
2423
*self.count += 1;

src/libcore/cell.rs

-2
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,6 @@ impl<'b> BorrowRef<'b> {
493493
}
494494
}
495495

496-
#[unsafe_destructor]
497496
impl<'b> Drop for BorrowRef<'b> {
498497
#[inline]
499498
fn drop(&mut self) {
@@ -557,7 +556,6 @@ struct BorrowRefMut<'b> {
557556
_borrow: &'b Cell<BorrowFlag>,
558557
}
559558

560-
#[unsafe_destructor]
561559
impl<'b> Drop for BorrowRefMut<'b> {
562560
#[inline]
563561
fn drop(&mut self) {

src/libcore/fmt/mod.rs

+6-12
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ mod num;
3434
mod float;
3535
mod builders;
3636

37-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
38-
#[cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))]
37+
#[unstable(feature = "core", reason = "internal to format_args!")]
3938
#[doc(hidden)]
4039
pub mod rt {
4140
pub mod v1;
@@ -148,8 +147,7 @@ enum Void {}
148147
/// compile time it is ensured that the function and the value have the correct
149148
/// types, and then this struct is used to canonicalize arguments to one type.
150149
#[derive(Copy)]
151-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
152-
#[cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))]
150+
#[unstable(feature = "core", reason = "internal to format_args!")]
153151
#[doc(hidden)]
154152
pub struct ArgumentV1<'a> {
155153
value: &'a Void,
@@ -169,8 +167,7 @@ impl<'a> ArgumentV1<'a> {
169167
}
170168

171169
#[doc(hidden)]
172-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
173-
#[cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))]
170+
#[unstable(feature = "core", reason = "internal to format_args!")]
174171
pub fn new<'b, T>(x: &'b T,
175172
f: fn(&T, &mut Formatter) -> Result) -> ArgumentV1<'b> {
176173
unsafe {
@@ -182,8 +179,7 @@ impl<'a> ArgumentV1<'a> {
182179
}
183180

184181
#[doc(hidden)]
185-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
186-
#[cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))]
182+
#[unstable(feature = "core", reason = "internal to format_args!")]
187183
pub fn from_usize(x: &usize) -> ArgumentV1 {
188184
ArgumentV1::new(x, ArgumentV1::show_usize)
189185
}
@@ -206,8 +202,7 @@ impl<'a> Arguments<'a> {
206202
/// When using the format_args!() macro, this function is used to generate the
207203
/// Arguments structure.
208204
#[doc(hidden)] #[inline]
209-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
210-
#[cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))]
205+
#[unstable(feature = "core", reason = "internal to format_args!")]
211206
pub fn new_v1(pieces: &'a [&'a str],
212207
args: &'a [ArgumentV1<'a>]) -> Arguments<'a> {
213208
Arguments {
@@ -224,8 +219,7 @@ impl<'a> Arguments<'a> {
224219
/// created with `argumentusize`. However, failing to do so doesn't cause
225220
/// unsafety, but will ignore invalid .
226221
#[doc(hidden)] #[inline]
227-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
228-
#[cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))]
222+
#[unstable(feature = "core", reason = "internal to format_args!")]
229223
pub fn new_v1_formatted(pieces: &'a [&'a str],
230224
args: &'a [ArgumentV1<'a>],
231225
fmt: &'a [rt::v1::Argument]) -> Arguments<'a> {

src/libcore/fmt/rt/v1.rs

+1-24
Original file line numberDiff line numberDiff line change
@@ -14,69 +14,46 @@
1414
//! These definitions are similar to their `ct` equivalents, but differ in that
1515
//! these can be statically allocated and are slightly optimized for the runtime
1616
17-
#![cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
18-
#![cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))]
17+
#![unstable(feature = "core", reason = "internal to format_args!")]
1918

2019
#[derive(Copy, Clone)]
21-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
2220
pub struct Argument {
23-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
2421
pub position: Position,
25-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
2622
pub format: FormatSpec,
2723
}
2824

2925
#[derive(Copy, Clone)]
30-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
3126
pub struct FormatSpec {
32-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
3327
pub fill: char,
34-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
3528
pub align: Alignment,
36-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
3729
pub flags: u32,
38-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
3930
pub precision: Count,
40-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
4131
pub width: Count,
4232
}
4333

4434
/// Possible alignments that can be requested as part of a formatting directive.
4535
#[derive(Copy, Clone, PartialEq)]
46-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
4736
pub enum Alignment {
4837
/// Indication that contents should be left-aligned.
49-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
5038
Left,
5139
/// Indication that contents should be right-aligned.
52-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
5340
Right,
5441
/// Indication that contents should be center-aligned.
55-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
5642
Center,
5743
/// No alignment was requested.
58-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
5944
Unknown,
6045
}
6146

6247
#[derive(Copy, Clone)]
63-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
6448
pub enum Count {
65-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
6649
Is(usize),
67-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
6850
Param(usize),
69-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
7051
NextParam,
71-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
7252
Implied,
7353
}
7454

7555
#[derive(Copy, Clone)]
76-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
7756
pub enum Position {
78-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
7957
Next,
80-
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
8158
At(usize)
8259
}

src/libcore/intrinsics.rs

-14
Original file line numberDiff line numberDiff line change
@@ -303,14 +303,8 @@ extern "rust-intrinsic" {
303303
/// }
304304
/// ```
305305
#[stable(feature = "rust1", since = "1.0.0")]
306-
#[cfg(not(stage0))]
307306
pub fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize);
308307

309-
/// dox
310-
#[stable(feature = "rust1", since = "1.0.0")]
311-
#[cfg(stage0)]
312-
pub fn copy_nonoverlapping<T>(dst: *mut T, src: *const T, count: usize);
313-
314308
/// Copies `count * size_of<T>` bytes from `src` to `dst`. The source
315309
/// and destination may overlap.
316310
///
@@ -340,14 +334,8 @@ extern "rust-intrinsic" {
340334
/// ```
341335
///
342336
#[stable(feature = "rust1", since = "1.0.0")]
343-
#[cfg(not(stage0))]
344337
pub fn copy<T>(src: *const T, dst: *mut T, count: usize);
345338

346-
/// dox
347-
#[stable(feature = "rust1", since = "1.0.0")]
348-
#[cfg(stage0)]
349-
pub fn copy<T>(dst: *mut T, src: *const T, count: usize);
350-
351339
/// Invokes memset on the specified pointer, setting `count * size_of::<T>()`
352340
/// bytes of memory starting at `dst` to `c`.
353341
#[stable(feature = "rust1", since = "1.0.0")]
@@ -572,7 +560,5 @@ extern "rust-intrinsic" {
572560

573561
/// Returns the value of the discriminant for the variant in 'v',
574562
/// cast to a `u64`; if `T` has no discriminant, returns 0.
575-
// SNAP 5520801
576-
#[cfg(not(stage0))]
577563
pub fn discriminant_value<T>(v: &T) -> u64;
578564
}

src/libcore/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565

6666
#![feature(intrinsics, lang_items)]
6767
#![feature(on_unimplemented)]
68-
#![feature(simd, unsafe_destructor)]
68+
#![feature(simd)]
6969
#![feature(staged_api)]
7070
#![feature(unboxed_closures)]
7171
#![feature(rustc_attrs)]

0 commit comments

Comments
 (0)