Skip to content

Commit 66b6dfa

Browse files
committed
---
yaml --- r: 216397 b: refs/heads/stable c: 960f800 h: refs/heads/master i: 216395: fcafd29 v: v3
1 parent f79cf40 commit 66b6dfa

File tree

181 files changed

+4670
-6331
lines changed

Some content is hidden

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

181 files changed

+4670
-6331
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ refs/heads/tmp: 378a370ff2057afeb1eae86eb6e78c476866a4a6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: a5286998df566e736b32f6795bfc3803bdaf453d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 7510bfebb66afbd916460a1fe0fb6b5d431840b3
32+
refs/heads/stable: 960f8006d2393fca0fb1a680f5216f859c2d5598
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375

branches/stable/src/doc/not_found.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,8 @@ function populate_rust_search() {
5757

5858
// #18540, use a single token
5959

60-
var a = document.createElement("a");
61-
a.href = "http://doc.rust-lang.org/core/?search=" + encodeURIComponent(lt);
62-
a.textContent = lt;
6360
var search = document.getElementById('core-search');
64-
search.innerHTML = "";
65-
search.appendChild(a);
61+
search.innerHTML = "<a href=\"http://doc.rust-lang.org/core/?search=" + lt + "\">" + lt + "</a>";
6662
}
6763
populate_site_search();
6864
populate_rust_search();

branches/stable/src/doc/reference.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Non-doc comments are interpreted as a form of whitespace.
103103

104104
## Whitespace
105105

106-
Whitespace is any non-empty string containing only the following characters:
106+
Whitespace is any non-empty string containing any the following characters:
107107

108108
- `U+0020` (space, `' '`)
109109
- `U+0009` (tab, `'\t'`)
@@ -1897,8 +1897,8 @@ release builds.
18971897

18981898
There are two kinds of configuration options, one that is either defined or not
18991899
(`#[cfg(foo)]`), and the other that contains a string that can be checked
1900-
against (`#[cfg(bar = "baz")]`). Currently, only compiler-defined configuration
1901-
options can have the latter form.
1900+
against (`#[cfg(bar = "baz")]` (currently only compiler-defined configuration
1901+
options can have the latter form).
19021902

19031903
```
19041904
// The function is only included in the build when compiling for OSX

branches/stable/src/doc/trpl/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ vector. When we try to compile this program, we get an error:
127127

128128
```text
129129
error: cannot borrow `x` as mutable because it is also borrowed as immutable
130-
x.push("foo");
130+
x.push(4);
131131
^
132132
note: previous borrow of `x` occurs here; the immutable borrow prevents
133133
subsequent moves or mutable borrows of `x` until the borrow ends

branches/stable/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/stable/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/stable/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/stable/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/stable/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/stable/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/stable/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/stable/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/stable/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/stable/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/stable/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/stable/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/stable/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/stable/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
}

0 commit comments

Comments
 (0)