Skip to content

Commit 80d28ac

Browse files
committed
---
yaml --- r: 128383 b: refs/heads/master c: 2f80444 h: refs/heads/master i: 128381: f622296 128379: 03927a8 128375: 441ae7f 128367: eb4f649 128351: 0a8669d 128319: 9cfc43c 128255: 5fe6864 v: v3
1 parent 1643444 commit 80d28ac

Some content is hidden

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

90 files changed

+263
-491
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: fb4201ff34f445f6c4d16c01b38dea65bad8ada1
2+
refs/heads/master: 2f8044418ef6102a94d09f4da9004a01de1dddf5
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a86d9ad15e339ab343a12513f9c90556f677b9ca
55
refs/heads/try: 73b8f60b60d8a2a7ca5a7d49d59771350b867951

trunk/src/doc/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ for the 'std' and 'extra' libraries.
1919
To generate HTML documentation from one source file/crate, do something like:
2020

2121
~~~~
22-
rustdoc --output html-doc/ --output-format html ../src/libstd/path.rs
22+
rustdoc --output-dir html-doc/ --output-format html ../src/libstd/path.rs
2323
~~~~
2424

2525
(This, of course, requires a working build of the `rustdoc` tool.)

trunk/src/doc/guide.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3669,9 +3669,10 @@ manually free this allocation! If we write
36693669
```
36703670

36713671
then Rust will automatically free `x` at the end of the block. This isn't
3672-
because Rust has a garbage collector -- it doesn't. Instead, when `x` goes out
3673-
of scope, Rust `free`s `x`. This Rust code will do the same thing as the
3674-
following C code:
3672+
because Rust has a garbage collector -- it doesn't. Instead, Rust uses static
3673+
analysis to determine the *lifetime* of `x`, and then generates code to free it
3674+
once it's sure the `x` won't be used again. This Rust code will do the same
3675+
thing as the following C code:
36753676

36763677
```{c,ignore}
36773678
{

trunk/src/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1801,7 +1801,7 @@ module through the rules above. It essentially allows public access into the
18011801
re-exported item. For example, this program is valid:
18021802

18031803
~~~~
1804-
pub use self::implementation as api;
1804+
pub use api = self::implementation;
18051805
18061806
mod implementation {
18071807
pub fn f() {}

trunk/src/doc/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3112,7 +3112,7 @@ use farm::*;
31123112
However, that's not all. You can also rename an item while you're bringing it into scope:
31133113

31143114
~~~
3115-
use farm::chicken as egg_layer;
3115+
use egg_layer = farm::chicken;
31163116
# mod farm { pub fn chicken() { println!("Laying eggs is fun!") } }
31173117
// ...
31183118
@@ -3335,7 +3335,7 @@ you just have to import it with an `use` statement.
33353335
For example, it re-exports `range` which is defined in `std::iter::range`:
33363336

33373337
~~~
3338-
use std::iter::range as iter_range;
3338+
use iter_range = std::iter::range;
33393339
33403340
fn main() {
33413341
// `range` is imported by default

trunk/src/liballoc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ extern crate libc;
8686

8787
#[deprecated = "use boxed instead"]
8888
#[cfg(not(test))]
89-
pub use boxed as owned;
89+
pub use owned = boxed;
9090

9191
// Heaps provided for low-level allocation strategies
9292

trunk/src/libcollections/bitv.rs

Lines changed: 3 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -75,25 +75,6 @@ use std::hash;
7575
use {Mutable, Set, MutableSet, MutableSeq};
7676
use vec::Vec;
7777

78-
// Take two BitV's, and return iterators of their words, where the shorter one
79-
// has been padded with 0's
80-
macro_rules! match_words(
81-
($a_expr:expr, $b_expr:expr) => ({
82-
let a = $a_expr;
83-
let b = $b_expr;
84-
let a_len = a.storage.len();
85-
let b_len = b.storage.len();
86-
87-
// have to uselessly pretend to pad the longer one for type matching
88-
if a_len < b_len {
89-
(a.mask_words(0).chain(iter::Repeat::new(0u).enumerate().take(b_len).skip(a_len)),
90-
b.mask_words(0).chain(iter::Repeat::new(0u).enumerate().take(0).skip(0)))
91-
} else {
92-
(a.mask_words(0).chain(iter::Repeat::new(0u).enumerate().take(0).skip(0)),
93-
b.mask_words(0).chain(iter::Repeat::new(0u).enumerate().take(a_len).skip(b_len)))
94-
}
95-
})
96-
)
9778

9879
static TRUE: bool = true;
9980
static FALSE: bool = false;
@@ -988,7 +969,7 @@ impl<'a> RandomAccessIterator<bool> for Bits<'a> {
988969
/// assert!(bv.eq_vec([true, true, false, true,
989970
/// false, false, false, false]));
990971
/// ```
991-
#[deriving(Clone)]
972+
#[deriving(Clone, PartialEq, Eq, PartialOrd, Ord)]
992973
pub struct BitvSet(Bitv);
993974

994975
impl Default for BitvSet {
@@ -1011,32 +992,6 @@ impl Extendable<bool> for BitvSet {
1011992
}
1012993
}
1013994

1014-
impl PartialOrd for BitvSet {
1015-
#[inline]
1016-
fn partial_cmp(&self, other: &BitvSet) -> Option<Ordering> {
1017-
let (a_iter, b_iter) = match_words!(self.get_ref(), other.get_ref());
1018-
iter::order::partial_cmp(a_iter, b_iter)
1019-
}
1020-
}
1021-
1022-
impl Ord for BitvSet {
1023-
#[inline]
1024-
fn cmp(&self, other: &BitvSet) -> Ordering {
1025-
let (a_iter, b_iter) = match_words!(self.get_ref(), other.get_ref());
1026-
iter::order::cmp(a_iter, b_iter)
1027-
}
1028-
}
1029-
1030-
impl cmp::PartialEq for BitvSet {
1031-
#[inline]
1032-
fn eq(&self, other: &BitvSet) -> bool {
1033-
let (a_iter, b_iter) = match_words!(self.get_ref(), other.get_ref());
1034-
iter::order::eq(a_iter, b_iter)
1035-
}
1036-
}
1037-
1038-
impl cmp::Eq for BitvSet {}
1039-
1040995
impl BitvSet {
1041996
/// Create a new bit vector set with initially no contents.
1042997
///
@@ -1186,18 +1141,10 @@ impl BitvSet {
11861141
// Unwrap Bitvs
11871142
let &BitvSet(ref mut self_bitv) = self;
11881143
let &BitvSet(ref other_bitv) = other;
1189-
11901144
// Expand the vector if necessary
11911145
self_bitv.reserve(other_bitv.capacity());
1192-
1193-
// virtually pad other with 0's for equal lengths
1194-
let self_len = self_bitv.storage.len();
1195-
let other_len = other_bitv.storage.len();
1196-
let mut other_words = other_bitv.mask_words(0)
1197-
.chain(iter::Repeat::new(0u).enumerate().take(self_len).skip(other_len));
1198-
1199-
// Apply values found in other
1200-
for (i, w) in other_words {
1146+
// Apply values
1147+
for (i, w) in other_bitv.mask_words(0) {
12011148
let old = self_bitv.storage[i];
12021149
let new = f(old, w);
12031150
*self_bitv.storage.get_mut(i) = new;
@@ -2266,64 +2213,6 @@ mod tests {
22662213
assert!(set1.is_subset(&set2)); // { 2 } { 2, 4 }
22672214
}
22682215

2269-
#[test]
2270-
fn test_bitv_set_intersect_with() {
2271-
// Explicitly 0'ed bits
2272-
let mut a = BitvSet::from_bitv(from_bytes([0b10100010]));
2273-
let mut b = BitvSet::from_bitv(from_bytes([0b00000000]));
2274-
let c = a.clone();
2275-
a.intersect_with(&b);
2276-
b.intersect_with(&c);
2277-
assert!(a.is_empty());
2278-
assert!(b.is_empty());
2279-
2280-
// Uninitialized bits should behave like 0's
2281-
let mut a = BitvSet::from_bitv(from_bytes([0b10100010]));
2282-
let mut b = BitvSet::new();
2283-
let c = a.clone();
2284-
a.intersect_with(&b);
2285-
b.intersect_with(&c);
2286-
assert!(a.is_empty());
2287-
assert!(b.is_empty());
2288-
2289-
// Standard
2290-
let mut a = BitvSet::from_bitv(from_bytes([0b10100010]));
2291-
let mut b = BitvSet::from_bitv(from_bytes([0b01100010]));
2292-
let c = a.clone();
2293-
a.intersect_with(&b);
2294-
b.intersect_with(&c);
2295-
assert_eq!(a.len(), 2);
2296-
assert_eq!(b.len(), 2);
2297-
}
2298-
2299-
#[test]
2300-
fn test_bitv_set_eq() {
2301-
let a = BitvSet::from_bitv(from_bytes([0b10100010]));
2302-
let b = BitvSet::from_bitv(from_bytes([0b00000000]));
2303-
let c = BitvSet::new();
2304-
2305-
assert!(a == a);
2306-
assert!(a != b);
2307-
assert!(a != c);
2308-
assert!(b == b);
2309-
assert!(b == c);
2310-
assert!(c == c);
2311-
}
2312-
2313-
#[test]
2314-
fn test_bitv_set_cmp() {
2315-
let a = BitvSet::from_bitv(from_bytes([0b10100010]));
2316-
let b = BitvSet::from_bitv(from_bytes([0b00000000]));
2317-
let c = BitvSet::new();
2318-
2319-
assert_eq!(a.cmp(&b), Greater);
2320-
assert_eq!(a.cmp(&c), Greater);
2321-
assert_eq!(b.cmp(&a), Less);
2322-
assert_eq!(b.cmp(&c), Equal);
2323-
assert_eq!(c.cmp(&a), Less);
2324-
assert_eq!(c.cmp(&b), Equal);
2325-
}
2326-
23272216
#[test]
23282217
fn test_bitv_remove() {
23292218
let mut a = BitvSet::new();

trunk/src/libcollections/hash/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ use core::mem;
7373
use vec::Vec;
7474

7575
/// Reexport the `sip::hash` function as our default hasher.
76-
pub use self::sip::hash as hash;
76+
pub use hash = self::sip::hash;
7777

7878
pub mod sip;
7979

trunk/src/libcollections/str.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,6 @@ the string is valid for the `'static` lifetime, otherwise known as the
4444
lifetime of the entire program. As can be inferred from the type, these static
4545
strings are not mutable.
4646
47-
# Mutability
48-
49-
Many languages have immutable strings by default, and Rust has a particular
50-
flavor on this idea. As with the rest of Rust types, strings are immutable by
51-
default. If a string is declared as `mut`, however, it may be mutated. This
52-
works the same way as the rest of Rust's type system in the sense that if
53-
there's a mutable reference to a string, there may only be one mutable reference
54-
to that string. With these guarantees, strings can easily transition between
55-
being mutable/immutable with the same benefits of having mutable strings in
56-
other languages.
57-
5847
# Representation
5948
6049
Rust's string type, `str`, is a sequence of unicode scalar values encoded as a

trunk/src/libcollections/string.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ use core::fmt;
1919
use core::mem;
2020
use core::ptr;
2121
// FIXME: ICE's abound if you import the `Slice` type while importing `Slice` trait
22-
use core::raw::Slice as RawSlice;
22+
use RawSlice = core::raw::Slice;
2323

2424
use {Mutable, MutableSeq};
2525
use hash;
2626
use str;
2727
use str::{CharRange, StrAllocating, MaybeOwned, Owned};
28-
use str::Slice as MaybeOwnedSlice; // So many `Slice`s...
28+
use MaybeOwnedSlice = str::Slice; // So many `Slice`s...
2929
use vec::Vec;
3030

3131
/// A growable string stored as a UTF-8 encoded buffer.

trunk/src/libcollections/vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
use core::prelude::*;
1414

1515
use alloc::heap::{allocate, reallocate, deallocate};
16+
use RawSlice = core::raw::Slice;
1617
use core::cmp::max;
1718
use core::default::Default;
1819
use core::fmt;
1920
use core::mem;
2021
use core::num;
2122
use core::ptr;
22-
use core::raw::Slice as RawSlice;
2323
use core::uint;
2424

2525
use {Mutable, MutableSeq};

trunk/src/libcore/kinds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ by the compiler automatically for the types to which they apply.
2121
*/
2222

2323
#[deprecated = "This has been renamed to Sync"]
24-
pub use self::Sync as Share;
24+
pub use Share = self::Sync;
2525

2626
/// Types able to be transferred across task boundaries.
2727
#[lang="send"]

trunk/src/libcore/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pub mod collections;
107107
/// Deprecated module in favor of `std::cell`
108108
pub mod ty {
109109
#[deprecated = "this type has been renamed to `UnsafeCell`"]
110-
pub use cell::UnsafeCell as Unsafe;
110+
pub use Unsafe = cell::UnsafeCell;
111111
}
112112

113113
/* Core types and methods on primitives */

trunk/src/libcore/option.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ impl<T> Option<T> {
244244
}
245245
}
246246

247-
/// Returns the inner `T` of a `Some(T)`.
247+
/// Moves a value out of an option type and returns it, consuming the `Option`.
248248
///
249249
/// # Failure
250250
///

trunk/src/libcore/slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ use mem::size_of;
5050
use kinds::marker;
5151
use raw::Repr;
5252
// Avoid conflicts with *both* the Slice trait (buggy) and the `slice::raw` module.
53-
use raw::Slice as RawSlice;
53+
use RawSlice = raw::Slice;
5454

5555

5656
//

trunk/src/libgraphviz/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ forming a diamond-shaped acyclic graph and then pointing to the fifth
4747
which is cyclic.
4848
4949
```rust
50-
use graphviz as dot;
50+
use dot = graphviz;
5151
use graphviz::maybe_owned_vec::IntoMaybeOwnedVector;
5252
5353
type Nd = int;
@@ -147,7 +147,7 @@ labelled with the &sube; character (specified using the HTML character
147147
entity `&sube`).
148148
149149
```rust
150-
use graphviz as dot;
150+
use dot = graphviz;
151151
use std::str;
152152
153153
type Nd = uint;
@@ -203,7 +203,7 @@ The output from this example is the same as the second example: the
203203
Hasse-diagram for the subsets of the set `{x, y}`.
204204
205205
```rust
206-
use graphviz as dot;
206+
use dot = graphviz;
207207
use std::str;
208208
209209
type Nd<'a> = (uint, &'a str);

trunk/src/libgreen/message_queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
use alloc::arc::Arc;
12-
use std::sync::mpsc_queue as mpsc;
12+
use mpsc = std::sync::mpsc_queue;
1313
use std::kinds::marker;
1414

1515
pub enum PopResult<T> {

trunk/src/libgreen/sched.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use coroutine::Coroutine;
2525
use sleeper_list::SleeperList;
2626
use stack::StackPool;
2727
use task::{TypeSched, GreenTask, HomeSched, AnySched};
28-
use message_queue as msgq;
28+
use msgq = message_queue;
2929

3030
/// A scheduler is responsible for coordinating the execution of Tasks
3131
/// on a single thread. The scheduler runs inside a slightly modified

0 commit comments

Comments
 (0)