Skip to content

Commit a7da788

Browse files
committed
---
yaml --- r: 138384 b: refs/heads/master c: b2e5773 h: refs/heads/master v: v3
1 parent 9e9593a commit a7da788

File tree

371 files changed

+1501
-12836
lines changed

Some content is hidden

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

371 files changed

+1501
-12836
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: 66939dfe645a2eaf2ba9a2750122836a37271db1
2+
refs/heads/master: b2e577365512433d17e68107a068fb82af88a67b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5

trunk/mk/crates.mk

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@
4949
# automatically generated for all stage/host/target combinations.
5050
################################################################################
5151

52-
TARGET_CRATES := libc std green native flate arena glob term semver \
53-
uuid serialize sync getopts collections num test time rand \
54-
url log regex graphviz core rbml rlibc alloc rustrt \
52+
TARGET_CRATES := libc std green native flate arena term \
53+
serialize sync getopts collections test time rand \
54+
log regex graphviz core rbml rlibc alloc rustrt \
5555
unicode
56-
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros \
56+
HOST_CRATES := syntax rustc rustdoc regex_macros fmt_macros \
5757
rustc_llvm rustc_back
5858
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5959
TOOLS := compiletest rustdoc rustc
@@ -83,18 +83,13 @@ DEPS_glob := std
8383
DEPS_serialize := std log
8484
DEPS_rbml := std log serialize
8585
DEPS_term := std log
86-
DEPS_semver := std
87-
DEPS_uuid := std serialize
8886
DEPS_sync := core alloc rustrt collections
8987
DEPS_getopts := std
9088
DEPS_collections := core alloc unicode
91-
DEPS_fourcc := rustc syntax std
92-
DEPS_hexfloat := rustc syntax std
9389
DEPS_num := std
9490
DEPS_test := std getopts serialize rbml term time regex native:rust_test_helpers
9591
DEPS_time := std serialize
9692
DEPS_rand := core
97-
DEPS_url := std
9893
DEPS_log := std regex
9994
DEPS_regex := std
10095
DEPS_regex_macros = rustc syntax std regex

trunk/src/doc/guide.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ but it will still print "Hello, world!":
482482
Compiling hello_world v0.0.1 (file:///home/you/projects/hello_world)
483483
src/main.rs:2:9: 2:10 warning: unused variable: `x`, #[warn(unused_variable)] on by default
484484
src/main.rs:2 let x: int;
485-
^
485+
^
486486
```
487487

488488
Rust warns us that we never use the variable binding, but since we never use it,
@@ -1255,8 +1255,9 @@ version, if we had forgotten the `Greater` case, for example, our program would
12551255
have happily compiled. If we forget in the `match`, it will not. Rust helps us
12561256
make sure to cover all of our bases.
12571257

1258-
`match` is also an expression, which means we can use it on the right hand side
1259-
of a `let` binding. We could also implement the previous line like this:
1258+
`match` is also an expression, which means we can use it on the right
1259+
hand side of a `let` binding or directly where an expression is
1260+
used. We could also implement the previous line like this:
12601261

12611262
```{rust}
12621263
fn cmp(a: int, b: int) -> Ordering {
@@ -1269,18 +1270,15 @@ fn main() {
12691270
let x = 5i;
12701271
let y = 10i;
12711272
1272-
let result = match cmp(x, y) {
1273+
println!("{}", match cmp(x, y) {
12731274
Less => "less",
12741275
Greater => "greater",
12751276
Equal => "equal",
1276-
};
1277-
1278-
println!("{}", result);
1277+
});
12791278
}
12801279
```
12811280

1282-
In this case, it doesn't make a lot of sense, as we are just making a temporary
1283-
string where we don't need to, but sometimes, it's a nice pattern.
1281+
Sometimes, it's a nice pattern.
12841282

12851283
# Looping
12861284

@@ -3097,10 +3095,10 @@ And try to run the test:
30973095

30983096
```{notrust,ignore}
30993097
$ cargo test
3100-
Compiling testing v0.0.1 (file:///home/youg/projects/testing)
3101-
/home/youg/projects/testing/tests/lib.rs:3:18: 3:38 error: unresolved name `add_three_times_four`.
3102-
/home/youg/projects/testing/tests/lib.rs:3 let result = add_three_times_four(5i);
3103-
^~~~~~~~~~~~~~~~~~~~
3098+
Compiling testing v0.0.1 (file:///home/you/projects/testing)
3099+
/home/you/projects/testing/tests/lib.rs:3:18: 3:38 error: unresolved name `add_three_times_four`.
3100+
/home/you/projects/testing/tests/lib.rs:3 let result = add_three_times_four(5i);
3101+
^~~~~~~~~~~~~~~~~~~~
31043102
error: aborting due to previous error
31053103
Build failed, waiting for other jobs to finish...
31063104
Could not compile `testing`.
@@ -3286,11 +3284,11 @@ Let's give it a shot:
32863284
$ cargo test
32873285
Compiling testing v0.0.1 (file:///home/you/projects/testing)
32883286
3289-
running 1 test
3287+
running 2 tests
32903288
test test::test_times_four ... ok
32913289
test test::test_add_three ... ok
32923290
3293-
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
3291+
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured
32943292
32953293
32963294
running 0 tests
@@ -4365,7 +4363,7 @@ element, `find` returns an `Option` rather than the element itself.
43654363
Another important consumer is `fold`. Here's what it looks like:
43664364

43674365
```{rust}
4368-
let sum = range(1i, 100i)
4366+
let sum = range(1i, 4i)
43694367
.fold(0i, |sum, x| sum + x);
43704368
```
43714369

@@ -4389,7 +4387,7 @@ in this iterator:
43894387
We called `fold()` with these arguments:
43904388

43914389
```{rust}
4392-
# range(1i, 5i)
4390+
# range(1i, 4i)
43934391
.fold(0i, |sum, x| sum + x);
43944392
```
43954393

trunk/src/libcollections/dlist.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -475,12 +475,6 @@ impl<T> DList<T> {
475475
Items{nelem: self.len(), head: &self.list_head, tail: self.list_tail}
476476
}
477477

478-
/// Deprecated: use `iter_mut`.
479-
#[deprecated = "use iter_mut"]
480-
pub fn mut_iter<'a>(&'a mut self) -> MutItems<'a, T> {
481-
self.iter_mut()
482-
}
483-
484478
/// Provides a forward iterator with mutable references.
485479
#[inline]
486480
pub fn iter_mut<'a>(&'a mut self) -> MutItems<'a, T> {
@@ -496,12 +490,6 @@ impl<T> DList<T> {
496490
}
497491
}
498492

499-
/// Deprecated: use `into_iter`.
500-
#[deprecated = "use into_iter"]
501-
pub fn move_iter(self) -> MoveItems<T> {
502-
self.into_iter()
503-
}
504-
505493
/// Consumes the list into an iterator yielding elements by value.
506494
#[inline]
507495
pub fn into_iter(self) -> MoveItems<T> {
@@ -870,7 +858,8 @@ mod tests {
870858
let mut m = list_from(v.as_slice());
871859
m.append(list_from(u.as_slice()));
872860
check_links(&m);
873-
let sum = v.append(u.as_slice());
861+
let mut sum = v;
862+
sum.push_all(u.as_slice());
874863
assert_eq!(sum.len(), m.len());
875864
for elt in sum.into_iter() {
876865
assert_eq!(m.pop_front(), Some(elt))

trunk/src/libcollections/lib.rs

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -502,40 +502,6 @@ pub trait Deque<T> : MutableSeq<T> {
502502
/// ```
503503
fn push_front(&mut self, elt: T);
504504

505-
/// Inserts an element last in the sequence.
506-
///
507-
/// # Example
508-
///
509-
/// ```ignore
510-
/// use std::collections::{DList, Deque};
511-
///
512-
/// let mut d = DList::new();
513-
/// d.push_back(1i);
514-
/// d.push_back(2i);
515-
/// assert_eq!(d.front(), Some(&1i));
516-
/// ```
517-
#[deprecated = "use the `push` method"]
518-
fn push_back(&mut self, elt: T) { self.push(elt) }
519-
520-
/// Removes the last element and returns it, or `None` if the sequence is
521-
/// empty.
522-
///
523-
/// # Example
524-
///
525-
/// ```ignore
526-
/// use std::collections::{RingBuf, Deque};
527-
///
528-
/// let mut d = RingBuf::new();
529-
/// d.push_back(1i);
530-
/// d.push_back(2i);
531-
///
532-
/// assert_eq!(d.pop_back(), Some(2i));
533-
/// assert_eq!(d.pop_back(), Some(1i));
534-
/// assert_eq!(d.pop_back(), None);
535-
/// ```
536-
#[deprecated = "use the `pop` method"]
537-
fn pop_back(&mut self) -> Option<T> { self.pop() }
538-
539505
/// Removes the first element and returns it, or `None` if the sequence is
540506
/// empty.
541507
///

trunk/src/libcollections/priority_queue.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,6 @@ impl<T: Ord> PriorityQueue<T> {
269269
if self.is_empty() { None } else { Some(&self.data[0]) }
270270
}
271271

272-
#[deprecated="renamed to `top`"]
273-
pub fn maybe_top<'a>(&'a self) -> Option<&'a T> { self.top() }
274-
275272
/// Returns the number of elements the queue can hold without reallocating.
276273
///
277274
/// # Example
@@ -341,9 +338,6 @@ impl<T: Ord> PriorityQueue<T> {
341338
}
342339
}
343340

344-
#[deprecated="renamed to `pop`"]
345-
pub fn maybe_pop(&mut self) -> Option<T> { self.pop() }
346-
347341
/// Pushes an item onto the queue.
348342
///
349343
/// # Example
@@ -417,14 +411,6 @@ impl<T: Ord> PriorityQueue<T> {
417411
}
418412
}
419413

420-
#[allow(dead_code)]
421-
#[deprecated="renamed to `into_vec`"]
422-
fn to_vec(self) -> Vec<T> { self.into_vec() }
423-
424-
#[allow(dead_code)]
425-
#[deprecated="renamed to `into_sorted_vec`"]
426-
fn to_sorted_vec(self) -> Vec<T> { self.into_sorted_vec() }
427-
428414
/// Consumes the `PriorityQueue` and returns the underlying vector
429415
/// in arbitrary order.
430416
///

0 commit comments

Comments
 (0)