Skip to content

Commit d934aba

Browse files
committed
---
yaml --- r: 195486 b: refs/heads/master c: d4a2c94 h: refs/heads/master v: v3
1 parent a84c299 commit d934aba

File tree

167 files changed

+602
-4014
lines changed

Some content is hidden

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

167 files changed

+602
-4014
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: d754722a04b99fdcae0fd97fa2a4395521145ef2
2+
refs/heads/master: d4a2c941809f303b97d153e06ba07e95cd245f88
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: b3317d68910900f135f9f38e43a7a699bc736b4a
55
refs/heads/try: 961e0358e1a5c0faaef606e31e9965742c1643bf

trunk/src/doc/reference.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -977,17 +977,13 @@ An example of `use` declarations:
977977

978978
```
979979
# #![feature(core)]
980-
use std::iter::range_step;
981980
use std::option::Option::{Some, None};
982981
use std::collections::hash_map::{self, HashMap};
983982
984983
fn foo<T>(_: T){}
985984
fn bar(map1: HashMap<String, usize>, map2: hash_map::HashMap<String, usize>){}
986985
987986
fn main() {
988-
// Equivalent to 'std::iter::range_step(0, 10, 2);'
989-
range_step(0, 10, 2);
990-
991987
// Equivalent to 'foo(vec![std::option::Option::Some(1.0f64),
992988
// std::option::Option::None]);'
993989
foo(vec![Some(1.0f64), None]);

trunk/src/doc/trpl/iterators.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,12 @@ for num in nums.iter() {
243243
```
244244

245245
These two basic iterators should serve you well. There are some more
246-
advanced iterators, including ones that are infinite. Like `count`:
246+
advanced iterators, including ones that are infinite. Like using range syntax
247+
and `step_by`:
247248

248249
```rust
249-
# #![feature(core)]
250-
std::iter::count(1, 5);
250+
# #![feature(step_by)]
251+
(1..).step_by(5);
251252
```
252253

253254
This iterator counts up from one, adding five each time. It will give
@@ -292,11 +293,11 @@ just use `for` instead.
292293
There are tons of interesting iterator adapters. `take(n)` will return an
293294
iterator over the next `n` elements of the original iterator, note that this
294295
has no side effect on the original iterator. Let's try it out with our infinite
295-
iterator from before, `count()`:
296+
iterator from before:
296297

297298
```rust
298-
# #![feature(core)]
299-
for i in std::iter::count(1, 5).take(5) {
299+
# #![feature(step_by)]
300+
for i in (1..).step_by(5).take(5) {
300301
println!("{}", i);
301302
}
302303
```

trunk/src/libcollections/bit.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
//! [sieve]: http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
3939
//!
4040
//! ```
41-
//! # #![feature(collections, core)]
41+
//! # #![feature(collections, core, step_by)]
4242
//! use std::collections::{BitSet, BitVec};
4343
//! use std::num::Float;
4444
//! use std::iter;
@@ -60,7 +60,7 @@
6060
//! if bv[i] {
6161
//! // Mark all multiples of i as non-prime (any multiples below i * i
6262
//! // will have been marked as non-prime previously)
63-
//! for j in iter::range_step(i * i, max_prime, i) { bv.set(j, false) }
63+
//! for j in (i * i..max_prime).step_by(i) { bv.set(j, false) }
6464
//! }
6565
//! }
6666
//! BitSet::from_bit_vec(bv)
@@ -1264,14 +1264,6 @@ impl BitSet {
12641264
BitSet { bit_vec: bit_vec }
12651265
}
12661266

1267-
/// Deprecated: use `from_bit_vec`.
1268-
#[inline]
1269-
#[deprecated(since = "1.0.0", reason = "renamed to from_bit_vec")]
1270-
#[unstable(feature = "collections")]
1271-
pub fn from_bitv(bit_vec: BitVec) -> BitSet {
1272-
BitSet { bit_vec: bit_vec }
1273-
}
1274-
12751267
/// Returns the capacity in bits for this bit vector. Inserting any
12761268
/// element less than this amount will not trigger a resizing.
12771269
///

trunk/src/libcollections/borrow.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -192,26 +192,6 @@ impl<'a, B: ?Sized> Cow<'a, B> where B: ToOwned {
192192
Owned(owned) => owned
193193
}
194194
}
195-
196-
/// Returns true if this `Cow` wraps a borrowed value
197-
#[deprecated(since = "1.0.0", reason = "match on the enum instead")]
198-
#[unstable(feature = "std_misc")]
199-
pub fn is_borrowed(&self) -> bool {
200-
match *self {
201-
Borrowed(_) => true,
202-
_ => false,
203-
}
204-
}
205-
206-
/// Returns true if this `Cow` wraps an owned value
207-
#[deprecated(since = "1.0.0", reason = "match on the enum instead")]
208-
#[unstable(feature = "std_misc")]
209-
pub fn is_owned(&self) -> bool {
210-
match *self {
211-
Owned(_) => true,
212-
_ => false,
213-
}
214-
}
215195
}
216196

217197
#[stable(feature = "rust1", since = "1.0.0")]

trunk/src/libcollections/lib.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -68,22 +68,6 @@ pub use string::String;
6868
pub use vec::Vec;
6969
pub use vec_map::VecMap;
7070

71-
#[deprecated(since = "1.0.0", reason = "renamed to vec_deque")]
72-
#[unstable(feature = "collections")]
73-
pub use vec_deque as ring_buf;
74-
75-
#[deprecated(since = "1.0.0", reason = "renamed to linked_list")]
76-
#[unstable(feature = "collections")]
77-
pub use linked_list as dlist;
78-
79-
#[deprecated(since = "1.0.0", reason = "renamed to bit_vec")]
80-
#[unstable(feature = "collections")]
81-
pub use bit_vec as bitv;
82-
83-
#[deprecated(since = "1.0.0", reason = "renamed to bit_set")]
84-
#[unstable(feature = "collections")]
85-
pub use bit_set as bitv_set;
86-
8771
// Needed for the vec! macro
8872
pub use alloc::boxed;
8973

@@ -108,21 +92,13 @@ pub mod vec_map;
10892
reason = "RFC 509")]
10993
pub mod bit_vec {
11094
pub use bit::{BitVec, Iter};
111-
112-
#[deprecated(since = "1.0.0", reason = "renamed to BitVec")]
113-
#[unstable(feature = "collections")]
114-
pub use bit::BitVec as Bitv;
11595
}
11696

11797
#[unstable(feature = "collections",
11898
reason = "RFC 509")]
11999
pub mod bit_set {
120100
pub use bit::{BitSet, Union, Intersection, Difference, SymmetricDifference};
121101
pub use bit::SetIter as Iter;
122-
123-
#[deprecated(since = "1.0.0", reason = "renamed to BitSet")]
124-
#[unstable(feature = "collections")]
125-
pub use bit::BitSet as BitvSet;
126102
}
127103

128104
#[stable(feature = "rust1", since = "1.0.0")]

trunk/src/libcollections/linked_list.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ use core::iter::{self, FromIterator, IntoIterator};
3232
use core::mem;
3333
use core::ptr;
3434

35-
#[deprecated(since = "1.0.0", reason = "renamed to LinkedList")]
36-
#[unstable(feature = "collections")]
37-
pub use LinkedList as DList;
38-
3935
/// A doubly-linked list.
4036
#[stable(feature = "rust1", since = "1.0.0")]
4137
pub struct LinkedList<T> {
@@ -844,7 +840,7 @@ impl<A> ExactSizeIterator for IntoIter<A> {}
844840
#[stable(feature = "rust1", since = "1.0.0")]
845841
impl<A> FromIterator<A> for LinkedList<A> {
846842
fn from_iter<T: IntoIterator<Item=A>>(iter: T) -> LinkedList<A> {
847-
let mut ret = DList::new();
843+
let mut ret = LinkedList::new();
848844
ret.extend(iter);
849845
ret
850846
}

trunk/src/libcollections/slice.rs

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ pub use core::slice::{IntSliceExt, SplitMut, ChunksMut, Split};
107107
pub use core::slice::{SplitN, RSplitN, SplitNMut, RSplitNMut};
108108
pub use core::slice::{bytes, mut_ref_slice, ref_slice};
109109
pub use core::slice::{from_raw_parts, from_raw_parts_mut};
110-
pub use core::slice::{from_raw_buf, from_raw_mut_buf};
111110

112111
////////////////////////////////////////////////////////////////////////////////
113112
// Basic slice extension methods
@@ -281,33 +280,6 @@ impl<T> [T] {
281280
cmp::min(self.len(), end-start)
282281
}
283282

284-
/// Deprecated: use `&s[start .. end]` notation instead.
285-
#[unstable(feature = "collections",
286-
reason = "will be replaced by slice syntax")]
287-
#[deprecated(since = "1.0.0", reason = "use &s[start .. end] instead")]
288-
#[inline]
289-
pub fn slice(&self, start: usize, end: usize) -> &[T] {
290-
&self[start .. end]
291-
}
292-
293-
/// Deprecated: use `&s[start..]` notation instead.
294-
#[unstable(feature = "collections",
295-
reason = "will be replaced by slice syntax")]
296-
#[deprecated(since = "1.0.0", reason = "use &s[start..] instead")]
297-
#[inline]
298-
pub fn slice_from(&self, start: usize) -> &[T] {
299-
&self[start ..]
300-
}
301-
302-
/// Deprecated: use `&s[..end]` notation instead.
303-
#[unstable(feature = "collections",
304-
reason = "will be replaced by slice syntax")]
305-
#[deprecated(since = "1.0.0", reason = "use &s[..end] instead")]
306-
#[inline]
307-
pub fn slice_to(&self, end: usize) -> &[T] {
308-
&self[.. end]
309-
}
310-
311283
/// Divides one slice into two at an index.
312284
///
313285
/// The first will contain all indices from `[0, mid)` (excluding
@@ -611,42 +583,6 @@ impl<T> [T] {
611583
core_slice::SliceExt::get_mut(self, index)
612584
}
613585

614-
/// Deprecated: use `&mut s[..]` instead.
615-
#[unstable(feature = "collections",
616-
reason = "will be replaced by slice syntax")]
617-
#[deprecated(since = "1.0.0", reason = "use &mut s[..] instead")]
618-
#[allow(deprecated)]
619-
pub fn as_mut_slice(&mut self) -> &mut [T] {
620-
core_slice::SliceExt::as_mut_slice(self)
621-
}
622-
623-
/// Deprecated: use `&mut s[start .. end]` instead.
624-
#[unstable(feature = "collections",
625-
reason = "will be replaced by slice syntax")]
626-
#[deprecated(since = "1.0.0", reason = "use &mut s[start .. end] instead")]
627-
#[inline]
628-
pub fn slice_mut(&mut self, start: usize, end: usize) -> &mut [T] {
629-
&mut self[start .. end]
630-
}
631-
632-
/// Deprecated: use `&mut s[start ..]` instead.
633-
#[unstable(feature = "collections",
634-
reason = "will be replaced by slice syntax")]
635-
#[deprecated(since = "1.0.0", reason = "use &mut s[start ..] instead")]
636-
#[inline]
637-
pub fn slice_from_mut(&mut self, start: usize) -> &mut [T] {
638-
&mut self[start ..]
639-
}
640-
641-
/// Deprecated: use `&mut s[.. end]` instead.
642-
#[unstable(feature = "collections",
643-
reason = "will be replaced by slice syntax")]
644-
#[deprecated(since = "1.0.0", reason = "use &mut s[.. end] instead")]
645-
#[inline]
646-
pub fn slice_to_mut(&mut self, end: usize) -> &mut [T] {
647-
&mut self[.. end]
648-
}
649-
650586
/// Returns an iterator that allows modifying each value
651587
#[stable(feature = "rust1", since = "1.0.0")]
652588
#[inline]
@@ -937,13 +873,6 @@ impl<T> [T] {
937873
core_slice::SliceExt::binary_search(self, x)
938874
}
939875

940-
/// Deprecated: use `binary_search` instead.
941-
#[unstable(feature = "collections")]
942-
#[deprecated(since = "1.0.0", reason = "use binary_search instead")]
943-
pub fn binary_search_elem(&self, x: &T) -> Result<usize, usize> where T: Ord {
944-
self.binary_search(x)
945-
}
946-
947876
/// Mutates the slice to the next lexicographic permutation.
948877
///
949878
/// Returns `true` if successful and `false` if the slice is at the

0 commit comments

Comments
 (0)