Skip to content

Commit 9e1455a

Browse files
committed
---
yaml --- r: 134895 b: refs/heads/snap-stage3 c: bd322f4 h: refs/heads/master i: 134893: 432c4c6 134891: 48d10bf 134887: e0b0413 134879: 35df117 v: v3
1 parent 8ffa6dc commit 9e1455a

File tree

74 files changed

+148
-338
lines changed

Some content is hidden

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

74 files changed

+148
-338
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: 7eb9337dace88c5ded431aa7507f06d50619131b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: f351e676cbe594893a043d52a9cd6149c3f47082
4+
refs/heads/snap-stage3: bd322f4c1fdc1e2109c388fd424378ff7be644ca
55
refs/heads/try: 14378ea357c06c23607ca61ade44f60a7a64a1c7
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/CONTRIBUTING.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ If you're just reporting a bug, please see:
44

55
http://doc.rust-lang.org/complement-bugreport.html
66

7-
## Submitting an issue
8-
9-
Please submit issues here for bug reports or implementation details. For feature
10-
requests, language changes, or major changes to the libraries, please submit an
11-
issue against the [RFCs repository](https://github.com/rust-lang/rfcs).
12-
137
## Pull request procedure
148

159
Pull requests should be targeted at Rust's `master` branch.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,13 @@ mod tests {
311311

312312
task::spawn(proc() {
313313
let arc_v: Arc<Vec<int>> = rx.recv();
314-
assert_eq!((*arc_v)[3], 4);
314+
assert_eq!(*arc_v.get(3), 4);
315315
});
316316

317317
tx.send(arc_v.clone());
318318

319-
assert_eq!((*arc_v)[2], 3);
320-
assert_eq!((*arc_v)[4], 5);
319+
assert_eq!(*arc_v.get(2), 3);
320+
assert_eq!(*arc_v.get(4), 5);
321321

322322
info!("{:?}", arc_v);
323323
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ pub trait MutableMap<K, V>: Map<K, V> + Mutable {
131131
/// let mut map = HashMap::new();
132132
/// assert_eq!(map.insert("key", 2i), true);
133133
/// assert_eq!(map.insert("key", 9i), false);
134-
/// assert_eq!(map["key"], 9i);
134+
/// assert_eq!(map.get(&"key"), &9i);
135135
/// ```
136136
#[inline]
137137
fn insert(&mut self, key: K, value: V) -> bool {
@@ -171,7 +171,7 @@ pub trait MutableMap<K, V>: Map<K, V> + Mutable {
171171
///
172172
/// map.insert("a", 1i);
173173
/// assert_eq!(map.swap("a", 37i), Some(1i));
174-
/// assert_eq!(map["a"], 37i);
174+
/// assert_eq!(map.get(&"a"), &37i);
175175
/// ```
176176
fn swap(&mut self, k: K, v: V) -> Option<V>;
177177

@@ -203,7 +203,7 @@ pub trait MutableMap<K, V>: Map<K, V> + Mutable {
203203
/// Some(x) => *x = 7i,
204204
/// None => (),
205205
/// }
206-
/// assert_eq!(map["a"], 7i);
206+
/// assert_eq!(map.get(&"a"), &7i);
207207
/// ```
208208
fn find_mut<'a>(&'a mut self, key: &K) -> Option<&'a mut V>;
209209
}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,6 @@ mod tests {
542542
use vec::Vec;
543543

544544
#[test]
545-
#[allow(deprecated)]
546545
fn test_simple() {
547546
let mut d = RingBuf::new();
548547
assert_eq!(d.len(), 0u);
@@ -588,7 +587,6 @@ mod tests {
588587
}
589588

590589
#[test]
591-
#[allow(deprecated)]
592590
fn test_boxes() {
593591
let a: Gc<int> = box(GC) 5;
594592
let b: Gc<int> = box(GC) 72;

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,6 @@ mod tests {
904904
}
905905

906906
#[test]
907-
#[allow(deprecated)]
908907
fn test_initn() {
909908
let mut a = vec![11i, 12, 13];
910909
let b: &[int] = &[11, 12, 13];
@@ -1304,7 +1303,6 @@ mod tests {
13041303
}
13051304

13061305
#[test]
1307-
#[allow(deprecated)]
13081306
fn test_bsearch_elem() {
13091307
assert_eq!([1i,2,3,4,5].bsearch_elem(&5), Some(4));
13101308
assert_eq!([1i,2,3,4,5].bsearch_elem(&4), Some(3));
@@ -1352,11 +1350,11 @@ mod tests {
13521350
#[test]
13531351
fn test_reverse() {
13541352
let mut v: Vec<int> = vec![10i, 20];
1355-
assert_eq!(v[0], 10);
1356-
assert_eq!(v[1], 20);
1353+
assert_eq!(*v.get(0), 10);
1354+
assert_eq!(*v.get(1), 20);
13571355
v.reverse();
1358-
assert_eq!(v[0], 20);
1359-
assert_eq!(v[1], 10);
1356+
assert_eq!(*v.get(0), 20);
1357+
assert_eq!(*v.get(1), 10);
13601358

13611359
let mut v3: Vec<int> = vec![];
13621360
v3.reverse();
@@ -1464,7 +1462,6 @@ mod tests {
14641462
}
14651463

14661464
#[test]
1467-
#[allow(deprecated)]
14681465
fn test_shift() {
14691466
let mut x = vec![1i, 2, 3];
14701467
assert_eq!(x.shift(), Some(1));
@@ -1904,7 +1901,6 @@ mod tests {
19041901
}
19051902

19061903
#[test]
1907-
#[allow(deprecated)]
19081904
fn test_copy_from() {
19091905
let mut a = [1i,2,3,4,5];
19101906
let b = [6i,7,8];

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -348,11 +348,11 @@ impl<V:Clone> SmallIntMap<V> {
348348
/// let mut map = SmallIntMap::new();
349349
///
350350
/// // Key does not exist, will do a simple insert
351-
/// assert!(map.update(1, vec![1i, 2], |mut old, new| { old.extend(new.into_iter()); old }));
351+
/// assert!(map.update(1, vec![1i, 2], |old, new| old.append(new.as_slice())));
352352
/// assert_eq!(map[1], vec![1i, 2]);
353353
///
354354
/// // Key exists, update the value
355-
/// assert!(!map.update(1, vec![3i, 4], |mut old, new| { old.extend(new.into_iter()); old }));
355+
/// assert!(!map.update(1, vec![3i, 4], |old, new| old.append(new.as_slice())));
356356
/// assert_eq!(map[1], vec![1i, 2, 3, 4]);
357357
/// ```
358358
pub fn update(&mut self, key: uint, newval: V, ff: |V, V| -> V) -> bool {
@@ -452,7 +452,7 @@ impl<V> Index<uint, V> for SmallIntMap<V> {
452452
}*/
453453

454454
macro_rules! iterator {
455-
(impl $name:ident -> $elem:ty, $($getter:ident),+) => {
455+
(impl $name:ident -> $elem:ty, $getter:ident) => {
456456
impl<'a, T> Iterator<$elem> for $name<'a, T> {
457457
#[inline]
458458
fn next(&mut self) -> Option<$elem> {
@@ -462,7 +462,7 @@ macro_rules! iterator {
462462
if elem.is_some() {
463463
let index = self.front;
464464
self.front += 1;
465-
return Some((index, elem $(. $getter ())+));
465+
return Some((index, elem. $getter ()));
466466
}
467467
}
468468
_ => ()
@@ -481,7 +481,7 @@ macro_rules! iterator {
481481
}
482482

483483
macro_rules! double_ended_iterator {
484-
(impl $name:ident -> $elem:ty, $($getter:ident),+) => {
484+
(impl $name:ident -> $elem:ty, $getter:ident) => {
485485
impl<'a, T> DoubleEndedIterator<$elem> for $name<'a, T> {
486486
#[inline]
487487
fn next_back(&mut self) -> Option<$elem> {
@@ -490,7 +490,7 @@ macro_rules! double_ended_iterator {
490490
Some(elem) => {
491491
if elem.is_some() {
492492
self.back -= 1;
493-
return Some((self.back, elem$(. $getter ())+));
493+
return Some((self.back, elem. $getter ()));
494494
}
495495
}
496496
_ => ()
@@ -510,8 +510,8 @@ pub struct Entries<'a, T:'a> {
510510
iter: slice::Items<'a, Option<T>>
511511
}
512512

513-
iterator!(impl Entries -> (uint, &'a T), as_ref, unwrap)
514-
double_ended_iterator!(impl Entries -> (uint, &'a T), as_ref, unwrap)
513+
iterator!(impl Entries -> (uint, &'a T), get_ref)
514+
double_ended_iterator!(impl Entries -> (uint, &'a T), get_ref)
515515

516516
/// Forward iterator over the key-value pairs of a map, with the
517517
/// values being mutable.
@@ -521,8 +521,8 @@ pub struct MutEntries<'a, T:'a> {
521521
iter: slice::MutItems<'a, Option<T>>
522522
}
523523

524-
iterator!(impl MutEntries -> (uint, &'a mut T), as_mut, unwrap)
525-
double_ended_iterator!(impl MutEntries -> (uint, &'a mut T), as_mut, unwrap)
524+
iterator!(impl MutEntries -> (uint, &'a mut T), get_mut_ref)
525+
double_ended_iterator!(impl MutEntries -> (uint, &'a mut T), get_mut_ref)
526526

527527
/// Forward iterator over the keys of a map
528528
pub type Keys<'a, T> =

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ impl<T> TrieMap<T> {
434434
fn bound_mut<'a>(&'a mut self, key: uint, upper: bool) -> MutEntries<'a, T> {
435435
bound!(MutEntries, self = self,
436436
key = key, is_upper = upper,
437-
slice_from = slice_from_mut, iter = iter_mut,
437+
slice_from = mut_slice_from, iter = mut_iter,
438438
mutability = mut)
439439
}
440440

@@ -1020,7 +1020,7 @@ macro_rules! iterator_impl {
10201020
}
10211021

10221022
iterator_impl! { Entries, iter = iter, mutability = }
1023-
iterator_impl! { MutEntries, iter = iter_mut, mutability = mut }
1023+
iterator_impl! { MutEntries, iter = mut_iter, mutability = mut }
10241024

10251025
/// A forward iterator over a set.
10261026
pub struct SetItems<'a> {

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,6 @@ impl<T> Vec<T> {
960960
/// # Example
961961
///
962962
/// ```
963-
/// #![allow(deprecated)]
964963
/// let vec = vec![1i, 2, 3, 4];
965964
/// assert!(vec.tailn(2) == [3, 4]);
966965
/// ```
@@ -1066,7 +1065,6 @@ impl<T> Vec<T> {
10661065
/// # Example
10671066
///
10681067
/// ```
1069-
/// #![allow(deprecated)]
10701068
/// let mut vec = vec![1i, 2, 3];
10711069
/// assert!(vec.shift() == Some(1));
10721070
/// assert_eq!(vec, vec![2, 3]);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ pub enum Void { }
9494
pub trait Any: AnyPrivate {}
9595

9696
/// An inner trait to ensure that only this module can call `get_type_id()`.
97-
pub trait AnyPrivate {
97+
trait AnyPrivate {
9898
/// Get the `TypeId` of `self`
9999
fn get_type_id(&self) -> TypeId;
100100
}

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ the `clone` method.
2525

2626
/// A common trait for cloning an object.
2727
pub trait Clone {
28-
/// Returns a copy of the value. The contents of owned pointers
29-
/// are copied to maintain uniqueness, while the contents of
30-
/// managed pointers are not copied.
28+
/// Returns a copy of the value.
3129
fn clone(&self) -> Self;
3230

3331
/// Perform copy-assignment from `source`.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2178,6 +2178,7 @@ pub type Iterate<'a, T> = Unfold<'a, T, IterateState<'a, T>>;
21782178

21792179
/// Creates a new iterator that produces an infinite sequence of
21802180
/// repeated applications of the given function `f`.
2181+
#[allow(visible_private_types)]
21812182
pub fn iterate<'a, T: Clone>(seed: T, f: |T|: 'a -> T) -> Iterate<'a, T> {
21822183
Unfold::new((f, Some(seed), true), |st| {
21832184
let &(ref mut f, ref mut val, ref mut first) = st;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,11 +1062,11 @@ pub trait MutableCloneableSlice<T> {
10621062
/// let mut dst = [0i, 0, 0];
10631063
/// let src = [1i, 2];
10641064
///
1065-
/// assert!(dst.clone_from_slice(src) == 2);
1065+
/// assert!(dst.copy_from(src) == 2);
10661066
/// assert!(dst == [1, 2, 0]);
10671067
///
10681068
/// let src2 = [3i, 4, 5, 6];
1069-
/// assert!(dst.clone_from_slice(src2) == 3);
1069+
/// assert!(dst.copy_from(src2) == 3);
10701070
/// assert!(dst == [3i, 4, 5]);
10711071
/// ```
10721072
fn clone_from_slice(self, &[T]) -> uint;

branches/snap-stage3/src/libcoretest/cmp.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ fn test_ordering_order() {
4242
}
4343

4444
#[test]
45-
#[allow(deprecated)]
4645
fn test_lexical_ordering() {
4746
fn t(o1: Ordering, o2: Ordering, e: Ordering) {
4847
assert_eq!(lexical_ordering(o1, o2), e);

branches/snap-stage3/src/libcoretest/option.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ fn test_ord() {
244244
}
245245

246246
#[test]
247-
#[allow(deprecated)]
248247
fn test_mutate() {
249248
let mut x = Some(3i);
250249
assert!(x.mutate(|i| i+1));

branches/snap-stage3/src/libdebug/repr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ macro_rules! try( ($me:expr, $e:expr) => (
3232

3333
/// Representations
3434
35-
pub trait Repr {
35+
trait Repr {
3636
fn write_repr(&self, writer: &mut io::Writer) -> io::IoResult<()>;
3737
}
3838

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ mod tests {
11421142
Ok(ref m) => {
11431143
// The next variable after the flag is just a free argument
11441144

1145-
assert!(m.free[0] == "20".to_string());
1145+
assert!(*m.free.get(0) == "20".to_string());
11461146
}
11471147
_ => fail!()
11481148
}
@@ -1298,8 +1298,8 @@ mod tests {
12981298
assert!(m.opt_present("t"));
12991299
assert_eq!(m.opt_str("t").unwrap(), "20".to_string());
13001300
let pair = m.opt_strs("test");
1301-
assert!(pair[0] == "20".to_string());
1302-
assert!(pair[1] == "30".to_string());
1301+
assert!(*pair.get(0) == "20".to_string());
1302+
assert!(*pair.get(1) == "30".to_string());
13031303
}
13041304
_ => fail!()
13051305
}
@@ -1351,19 +1351,19 @@ mod tests {
13511351
let rs = getopts(args.as_slice(), opts.as_slice());
13521352
match rs {
13531353
Ok(ref m) => {
1354-
assert!(m.free[0] == "prog".to_string());
1355-
assert!(m.free[1] == "free1".to_string());
1354+
assert!(*m.free.get(0) == "prog".to_string());
1355+
assert!(*m.free.get(1) == "free1".to_string());
13561356
assert_eq!(m.opt_str("s").unwrap(), "20".to_string());
1357-
assert!(m.free[2] == "free2".to_string());
1357+
assert!(*m.free.get(2) == "free2".to_string());
13581358
assert!((m.opt_present("flag")));
13591359
assert_eq!(m.opt_str("long").unwrap(), "30".to_string());
13601360
assert!((m.opt_present("f")));
13611361
let pair = m.opt_strs("m");
1362-
assert!(pair[0] == "40".to_string());
1363-
assert!(pair[1] == "50".to_string());
1362+
assert!(*pair.get(0) == "40".to_string());
1363+
assert!(*pair.get(1) == "50".to_string());
13641364
let pair = m.opt_strs("n");
1365-
assert!(pair[0] == "-A B".to_string());
1366-
assert!(pair[1] == "-60 70".to_string());
1365+
assert!(*pair.get(0) == "-A B".to_string());
1366+
assert!(*pair.get(1) == "-60 70".to_string());
13671367
assert!((!m.opt_present("notpresent")));
13681368
}
13691369
_ => fail!()

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@ impl Pattern {
336336
* # Example
337337
*
338338
* ```rust
339-
* #![allow(deprecated)]
340339
* use glob::Pattern;
341340
*
342341
* assert!(Pattern::new("c?t").matches("cat"));

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218

219219
// NB this does *not* include globs, please keep it that way.
220220
#![feature(macro_rules, phase, default_type_params)]
221-
#![allow(deprecated)]
221+
#![allow(visible_private_types, deprecated)]
222222

223223
#[cfg(test)] #[phase(plugin, link)] extern crate log;
224224
#[cfg(test)] extern crate rustuv;
@@ -385,7 +385,7 @@ pub struct SchedPool {
385385
/// keep track of how many tasks are currently running in the pool and then
386386
/// sending on a channel once the entire pool has been drained of all tasks.
387387
#[deriving(Clone)]
388-
pub struct TaskState {
388+
struct TaskState {
389389
cnt: Arc<AtomicUint>,
390390
done: Sender<()>,
391391
}

branches/snap-stage3/src/libnative/io/timer_unix.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,15 @@ pub struct Timer {
6666
inner: Option<Box<Inner>>,
6767
}
6868

69-
pub struct Inner {
69+
struct Inner {
7070
cb: Option<Box<rtio::Callback + Send>>,
7171
interval: u64,
7272
repeat: bool,
7373
target: u64,
7474
id: uint,
7575
}
7676

77+
#[allow(visible_private_types)]
7778
pub enum Req {
7879
// Add a new timer to the helper thread.
7980
NewTimer(Box<Inner>),

0 commit comments

Comments
 (0)