Skip to content

Commit 03927a8

Browse files
committed
---
yaml --- r: 128379 b: refs/heads/master c: 4a288bc h: refs/heads/master i: 128377: ad17b23 128375: 441ae7f v: v3
1 parent ca1a2e6 commit 03927a8

Some content is hidden

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

88 files changed

+267
-474
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: 98ec85f19e42edafc3d82a737f0ccbd1b7f4ff6c
2+
refs/heads/master: 4a288bc4b7025bef6a12c7e0cd196eb8371e2753
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/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/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

trunk/src/liblibc/lib.rs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,13 +1456,47 @@ pub mod types {
14561456
pub Data4: [BYTE, ..8],
14571457
}
14581458

1459+
// NOTE(pcwalton, stage0): Remove after snapshot (typeck bug
1460+
// workaround).
1461+
#[cfg(stage0)]
1462+
pub struct WSAPROTOCOLCHAIN {
1463+
pub ChainLen: c_int,
1464+
pub ChainEntries: [DWORD, ..MAX_PROTOCOL_CHAIN],
1465+
}
1466+
#[cfg(not(stage0))]
14591467
pub struct WSAPROTOCOLCHAIN {
14601468
pub ChainLen: c_int,
14611469
pub ChainEntries: [DWORD, ..MAX_PROTOCOL_CHAIN as uint],
14621470
}
14631471

14641472
pub type LPWSAPROTOCOLCHAIN = *mut WSAPROTOCOLCHAIN;
14651473

1474+
// NOTE(pcwalton, stage0): Remove after snapshot (typeck bug
1475+
// workaround).
1476+
#[cfg(stage0)]
1477+
pub struct WSAPROTOCOL_INFO {
1478+
pub dwServiceFlags1: DWORD,
1479+
pub dwServiceFlags2: DWORD,
1480+
pub dwServiceFlags3: DWORD,
1481+
pub dwServiceFlags4: DWORD,
1482+
pub dwProviderFlags: DWORD,
1483+
pub ProviderId: GUID,
1484+
pub dwCatalogEntryId: DWORD,
1485+
pub ProtocolChain: WSAPROTOCOLCHAIN,
1486+
pub iVersion: c_int,
1487+
pub iAddressFamily: c_int,
1488+
pub iMaxSockAddr: c_int,
1489+
pub iMinSockAddr: c_int,
1490+
pub iSocketType: c_int,
1491+
pub iProtocol: c_int,
1492+
pub iProtocolMaxOffset: c_int,
1493+
pub iNetworkByteOrder: c_int,
1494+
pub iSecurityScheme: c_int,
1495+
pub dwMessageSize: DWORD,
1496+
pub dwProviderReserved: DWORD,
1497+
pub szProtocol: [u8, ..WSAPROTOCOL_LEN+1],
1498+
}
1499+
#[cfg(not(stage0))]
14661500
pub struct WSAPROTOCOL_INFO {
14671501
pub dwServiceFlags1: DWORD,
14681502
pub dwServiceFlags2: DWORD,

trunk/src/libnative/io/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ mod tty;
7979
#[cfg(windows)] #[path = "c_win32.rs"] mod c;
8080

8181
fn unimpl() -> IoError {
82-
#[cfg(unix)] use libc::ENOSYS as ERROR;
83-
#[cfg(windows)] use libc::ERROR_CALL_NOT_IMPLEMENTED as ERROR;
82+
#[cfg(unix)] use ERROR = libc::ENOSYS;
83+
#[cfg(windows)] use ERROR = libc::ERROR_CALL_NOT_IMPLEMENTED;
8484
IoError {
8585
code: ERROR as uint,
8686
extra: 0,

0 commit comments

Comments
 (0)