Skip to content

Commit 9b5ecf2

Browse files
committed
---
yaml --- r: 207750 b: refs/heads/snap-stage3 c: 41ff911 h: refs/heads/master v: v3
1 parent 06d1faf commit 9b5ecf2

File tree

94 files changed

+405
-76
lines changed

Some content is hidden

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

94 files changed

+405
-76
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 38a97becdf3e6a6157f6f7ec2d98ade8d8edc193
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: c48b499ea31592fe332e8927ecf64a44ebcb0889
4+
refs/heads/snap-stage3: 41ff911ae8eed8c48df1f50a69e9d3fca5d52bd6
55
refs/heads/try: 7b4ef47b7805a402d756fb8157101f64880a522f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/liballoc/arc.rs

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

358+
#[unsafe_destructor]
358359
#[stable(feature = "rust1", since = "1.0.0")]
359360
impl<T> Drop for Arc<T> {
360361
/// Drops the `Arc<T>`.
@@ -488,6 +489,7 @@ impl<T> Clone for Weak<T> {
488489
}
489490
}
490491

492+
#[unsafe_destructor]
491493
#[stable(feature = "rust1", since = "1.0.0")]
492494
impl<T> Drop for Weak<T> {
493495
/// Drops the `Weak<T>`.

branches/snap-stage3/src/liballoc/lib.rs

Lines changed: 1 addition & 1 deletion
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)]
76+
#![feature(lang_items, unsafe_destructor)]
7777
#![feature(box_syntax)]
7878
#![feature(optin_builtin_traits)]
7979
#![feature(unboxed_closures)]

branches/snap-stage3/src/liballoc/rc.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ impl<T> Deref for Rc<T> {
375375
}
376376
}
377377

378+
#[unsafe_destructor]
378379
#[stable(feature = "rust1", since = "1.0.0")]
379380
impl<T> Drop for Rc<T> {
380381
/// Drops the `Rc<T>`.
@@ -692,6 +693,7 @@ impl<T> Weak<T> {
692693
}
693694
}
694695

696+
#[unsafe_destructor]
695697
#[stable(feature = "rust1", since = "1.0.0")]
696698
impl<T> Drop for Weak<T> {
697699
/// Drops the `Weak<T>`.

branches/snap-stage3/src/libarena/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#![feature(core)]
3636
#![feature(staged_api)]
3737
#![feature(unboxed_closures)]
38+
#![feature(unsafe_destructor)]
3839
#![cfg_attr(test, feature(test))]
3940

4041
extern crate alloc;
@@ -123,6 +124,7 @@ fn chunk(size: usize, is_copy: bool) -> Chunk {
123124
}
124125
}
125126

127+
#[unsafe_destructor]
126128
impl<'longer_than_self> Drop for Arena<'longer_than_self> {
127129
fn drop(&mut self) {
128130
unsafe {
@@ -508,6 +510,7 @@ impl<T> TypedArena<T> {
508510
}
509511
}
510512

513+
#[unsafe_destructor]
511514
impl<T> Drop for TypedArena<T> {
512515
fn drop(&mut self) {
513516
unsafe {

branches/snap-stage3/src/libcollections/btree/node.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,12 +270,14 @@ impl<T> DoubleEndedIterator for RawItems<T> {
270270
}
271271
}
272272

273+
#[unsafe_destructor]
273274
impl<T> Drop for RawItems<T> {
274275
fn drop(&mut self) {
275276
for _ in self.by_ref() {}
276277
}
277278
}
278279

280+
#[unsafe_destructor]
279281
impl<K, V> Drop for Node<K, V> {
280282
fn drop(&mut self) {
281283
if self.keys.is_null() ||
@@ -1392,6 +1394,7 @@ impl<K, V> TraversalImpl for MoveTraversalImpl<K, V> {
13921394
}
13931395
}
13941396

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

branches/snap-stage3/src/libcollections/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#![feature(staged_api)]
3434
#![feature(unboxed_closures)]
3535
#![feature(unicode)]
36+
#![feature(unsafe_destructor)]
3637
#![feature(unique)]
3738
#![feature(unsafe_no_drop_flag, filling_drop)]
3839
#![feature(step_by)]

branches/snap-stage3/src/libcollections/linked_list.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ impl<T> LinkedList<T> {
624624
}
625625
}
626626

627+
#[unsafe_destructor]
627628
#[stable(feature = "rust1", since = "1.0.0")]
628629
impl<T> Drop for LinkedList<T> {
629630
fn drop(&mut self) {

branches/snap-stage3/src/libcollections/vec.rs

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

1629+
#[unsafe_destructor]
16291630
#[stable(feature = "rust1", since = "1.0.0")]
16301631
impl<T> Drop for Vec<T> {
16311632
fn drop(&mut self) {
@@ -1807,6 +1808,7 @@ impl<T> DoubleEndedIterator for IntoIter<T> {
18071808
#[stable(feature = "rust1", since = "1.0.0")]
18081809
impl<T> ExactSizeIterator for IntoIter<T> {}
18091810

1811+
#[unsafe_destructor]
18101812
#[stable(feature = "rust1", since = "1.0.0")]
18111813
impl<T> Drop for IntoIter<T> {
18121814
fn drop(&mut self) {
@@ -1865,6 +1867,7 @@ impl<'a, T> DoubleEndedIterator for Drain<'a, T> {
18651867
}
18661868
}
18671869

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

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

1986+
#[unsafe_destructor]
19821987
impl<T,U> Drop for PartialVecNonZeroSized<T,U> {
19831988
fn drop(&mut self) {
19841989
unsafe {
@@ -2004,6 +2009,7 @@ impl<T,U> Drop for PartialVecNonZeroSized<T,U> {
20042009
}
20052010
}
20062011

2012+
#[unsafe_destructor]
20072013
impl<T,U> Drop for PartialVecZeroSized<T,U> {
20082014
fn drop(&mut self) {
20092015
unsafe {

branches/snap-stage3/src/libcollections/vec_deque.rs

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

62+
#[unsafe_destructor]
6263
#[stable(feature = "rust1", since = "1.0.0")]
6364
impl<T> Drop for VecDeque<T> {
6465
fn drop(&mut self) {
@@ -1611,6 +1612,7 @@ pub struct Drain<'a, T: 'a> {
16111612
inner: &'a mut VecDeque<T>,
16121613
}
16131614

1615+
#[unsafe_destructor]
16141616
#[stable(feature = "rust1", since = "1.0.0")]
16151617
impl<'a, T: 'a> Drop for Drain<'a, T> {
16161618
fn drop(&mut self) {

branches/snap-stage3/src/libcollectionstest/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#![feature(test)]
1919
#![feature(unboxed_closures)]
2020
#![feature(unicode)]
21+
#![feature(unsafe_destructor)]
2122
#![feature(into_cow)]
2223
#![feature(step_by)]
2324
#![cfg_attr(test, feature(str_char))]

branches/snap-stage3/src/libcollectionstest/vec.rs

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

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

branches/snap-stage3/src/libcore/cell.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@ impl<'b> BorrowRef<'b> {
493493
}
494494
}
495495

496+
#[unsafe_destructor]
496497
impl<'b> Drop for BorrowRef<'b> {
497498
#[inline]
498499
fn drop(&mut self) {
@@ -556,6 +557,7 @@ struct BorrowRefMut<'b> {
556557
_borrow: &'b Cell<BorrowFlag>,
557558
}
558559

560+
#[unsafe_destructor]
559561
impl<'b> Drop for BorrowRefMut<'b> {
560562
#[inline]
561563
fn drop(&mut self) {

branches/snap-stage3/src/libcore/fmt/mod.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ mod num;
3434
mod float;
3535
mod builders;
3636

37-
#[unstable(feature = "core", reason = "internal to format_args!")]
37+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
38+
#[cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))]
3839
#[doc(hidden)]
3940
pub mod rt {
4041
pub mod v1;
@@ -147,7 +148,8 @@ enum Void {}
147148
/// compile time it is ensured that the function and the value have the correct
148149
/// types, and then this struct is used to canonicalize arguments to one type.
149150
#[derive(Copy)]
150-
#[unstable(feature = "core", reason = "internal to format_args!")]
151+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
152+
#[cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))]
151153
#[doc(hidden)]
152154
pub struct ArgumentV1<'a> {
153155
value: &'a Void,
@@ -167,7 +169,8 @@ impl<'a> ArgumentV1<'a> {
167169
}
168170

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

181184
#[doc(hidden)]
182-
#[unstable(feature = "core", reason = "internal to format_args!")]
185+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
186+
#[cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))]
183187
pub fn from_usize(x: &usize) -> ArgumentV1 {
184188
ArgumentV1::new(x, ArgumentV1::show_usize)
185189
}
@@ -202,7 +206,8 @@ impl<'a> Arguments<'a> {
202206
/// When using the format_args!() macro, this function is used to generate the
203207
/// Arguments structure.
204208
#[doc(hidden)] #[inline]
205-
#[unstable(feature = "core", reason = "internal to format_args!")]
209+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
210+
#[cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))]
206211
pub fn new_v1(pieces: &'a [&'a str],
207212
args: &'a [ArgumentV1<'a>]) -> Arguments<'a> {
208213
Arguments {
@@ -219,7 +224,8 @@ impl<'a> Arguments<'a> {
219224
/// created with `argumentusize`. However, failing to do so doesn't cause
220225
/// unsafety, but will ignore invalid .
221226
#[doc(hidden)] #[inline]
222-
#[unstable(feature = "core", reason = "internal to format_args!")]
227+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
228+
#[cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))]
223229
pub fn new_v1_formatted(pieces: &'a [&'a str],
224230
args: &'a [ArgumentV1<'a>],
225231
fmt: &'a [rt::v1::Argument]) -> Arguments<'a> {

branches/snap-stage3/src/libcore/fmt/rt/v1.rs

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,46 +14,69 @@
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-
#![unstable(feature = "core", reason = "internal to format_args!")]
17+
#![cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
18+
#![cfg_attr(not(stage0), unstable(feature = "core", reason = "internal to format_args!"))]
1819

1920
#[derive(Copy, Clone)]
21+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
2022
pub struct Argument {
23+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
2124
pub position: Position,
25+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
2226
pub format: FormatSpec,
2327
}
2428

2529
#[derive(Copy, Clone)]
30+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
2631
pub struct FormatSpec {
32+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
2733
pub fill: char,
34+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
2835
pub align: Alignment,
36+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
2937
pub flags: u32,
38+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
3039
pub precision: Count,
40+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
3141
pub width: Count,
3242
}
3343

3444
/// Possible alignments that can be requested as part of a formatting directive.
3545
#[derive(Copy, Clone, PartialEq)]
46+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
3647
pub enum Alignment {
3748
/// Indication that contents should be left-aligned.
49+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
3850
Left,
3951
/// Indication that contents should be right-aligned.
52+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
4053
Right,
4154
/// Indication that contents should be center-aligned.
55+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
4256
Center,
4357
/// No alignment was requested.
58+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
4459
Unknown,
4560
}
4661

4762
#[derive(Copy, Clone)]
63+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
4864
pub enum Count {
65+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
4966
Is(usize),
67+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
5068
Param(usize),
69+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
5170
NextParam,
71+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
5272
Implied,
5373
}
5474

5575
#[derive(Copy, Clone)]
76+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
5677
pub enum Position {
78+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
5779
Next,
80+
#[cfg_attr(stage0, stable(feature = "rust1", since = "1.0.0"))]
5881
At(usize)
5982
}

branches/snap-stage3/src/libcore/intrinsics.rs

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

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+
308314
/// Copies `count * size_of<T>` bytes from `src` to `dst`. The source
309315
/// and destination may overlap.
310316
///
@@ -334,8 +340,14 @@ extern "rust-intrinsic" {
334340
/// ```
335341
///
336342
#[stable(feature = "rust1", since = "1.0.0")]
343+
#[cfg(not(stage0))]
337344
pub fn copy<T>(src: *const T, dst: *mut T, count: usize);
338345

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+
339351
/// Invokes memset on the specified pointer, setting `count * size_of::<T>()`
340352
/// bytes of memory starting at `dst` to `c`.
341353
#[stable(feature = "rust1", since = "1.0.0")]
@@ -560,5 +572,7 @@ extern "rust-intrinsic" {
560572

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

0 commit comments

Comments
 (0)