Skip to content

Commit 441ae7f

Browse files
committed
---
yaml --- r: 128375 b: refs/heads/master c: 88e62a9 h: refs/heads/master i: 128373: ec0ae56 128371: c77a006 128367: eb4f649 v: v3
1 parent 4d78891 commit 441ae7f

File tree

26 files changed

+124
-334
lines changed

26 files changed

+124
-334
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: 7074592ee1ad1a155919268229b6464f2acc576e
2+
refs/heads/master: 88e62a96ce9d068382347ee047b0b382dc7c4784
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: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3669,10 +3669,9 @@ 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, 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:
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:
36763675

36773676
```{c,ignore}
36783677
{

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/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/libregex/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,8 @@ mod parse;
395395
mod re;
396396
mod vm;
397397

398-
#[cfg(test)]
398+
// FIXME(#13725) windows needs fixing.
399+
#[cfg(test, not(windows))]
399400
mod test;
400401

401402
/// The `native` module exists to support the `regex!` macro. Do not use.

trunk/src/librustc/back/link.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,9 +1475,6 @@ fn link_args(cmd: &mut Command,
14751475

14761476
// Always enable DEP (NX bit) when it is available
14771477
cmd.arg("-Wl,--nxcompat");
1478-
1479-
// Mark all dynamic libraries and executables as compatible with ASLR
1480-
cmd.arg("-Wl,--dynamicbase");
14811478
}
14821479

14831480
if sess.targ_cfg.os == abi::OsAndroid {

trunk/src/librustc/diagnostics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ register_diagnostics!(
139139
E0120,
140140
E0121,
141141
E0122,
142+
E0123,
142143
E0124,
143144
E0125,
144145
E0126,
@@ -172,6 +173,5 @@ register_diagnostics!(
172173
E0154,
173174
E0155,
174175
E0156,
175-
E0157,
176-
E0158
176+
E0157
177177
)

0 commit comments

Comments
 (0)