Skip to content

Commit 6aee99e

Browse files
committed
---
yaml --- r: 128893 b: refs/heads/try c: 54cb0f6 h: refs/heads/master i: 128891: 801f0db v: v3
1 parent c18d7a2 commit 6aee99e

File tree

15 files changed

+40
-250
lines changed

15 files changed

+40
-250
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 07d86b46a949a94223da714e35b343243e4ecce4
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a86d9ad15e339ab343a12513f9c90556f677b9ca
5-
refs/heads/try: 01ec6fab21026bee34afe79d54521567de9e8517
5+
refs/heads/try: 54cb0f6368bcfe996c65d388a0516ac656c606d0
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/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.)

branches/try/src/etc/emacs/rust-mode.el

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
(defconst rust-mode-keywords
171171
'("as"
172172
"box" "break"
173-
"const" "continue" "crate"
173+
"continue" "crate"
174174
"do"
175175
"else" "enum" "extern"
176176
"false" "fn" "for"
@@ -182,8 +182,7 @@
182182
"self" "static" "struct" "super"
183183
"true" "trait" "type"
184184
"unsafe" "use"
185-
"virtual"
186-
"where" "while"))
185+
"while"))
187186

188187
(defconst rust-special-types
189188
'("u8" "i8"

branches/try/src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@
7171
<keyword>trait</keyword>
7272
<keyword>unsafe</keyword>
7373
<keyword>use</keyword>
74-
<keyword>virtual</keyword>
75-
<keyword>where</keyword>
7674
<keyword>while</keyword>
7775
</context>
7876

branches/try/src/etc/kate/rust.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
<item> as </item>
2020
<item> break </item>
2121
<item> box </item>
22-
<item> const </item>
2322
<item> continue </item>
2423
<item> crate </item>
2524
<item> do </item>
@@ -45,8 +44,6 @@
4544
<item> trait </item>
4645
<item> unsafe </item>
4746
<item> use </item>
48-
<item> virtual </item>
49-
<item> where </item>
5047
<item> while </item>
5148
</list>
5249
<list name="traits">

branches/try/src/etc/vim/syntax/rust.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite skipempty
2626
syn keyword rustKeyword for in if impl let
2727
syn keyword rustKeyword loop once proc pub
2828
syn keyword rustKeyword return super
29-
syn keyword rustKeyword unsafe virtual where while
29+
syn keyword rustKeyword unsafe virtual while
3030
syn keyword rustKeyword use nextgroup=rustModPath,rustModPathInUse skipwhite skipempty
3131
" FIXME: Scoped impl's name is also fallen in this category
3232
syn keyword rustKeyword mod trait struct enum type nextgroup=rustIdentifier skipwhite skipempty

branches/try/src/libcollections/bitv.rs

Lines changed: 4 additions & 115 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;
@@ -1324,7 +1271,7 @@ impl BitvSet {
13241271
/// let a = BitvSet::from_bitv(bitv::from_bytes([0b01101000]));
13251272
/// let b = BitvSet::from_bitv(bitv::from_bytes([0b10100000]));
13261273
///
1327-
/// // Print 1, 4 in arbitrary order
1274+
/// // Print 2, 4 in arbitrary order
13281275
/// for x in a.difference(&b) {
13291276
/// println!("{}", x);
13301277
/// }
@@ -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();

branches/try/src/libcollections/btree.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@
1111
// btree.rs
1212
//
1313

14-
// NB. this is not deprecated for removal, just deprecating the
15-
// current implementation. If the major pain-points are addressed
16-
// (overuse of by-value self and .clone), this can be removed.
17-
#![deprecated = "the current implementation is extremely inefficient, \
18-
prefer a HashMap, TreeMap or TrieMap"]
19-
#![allow(deprecated)]
20-
2114
//! Starting implementation of a btree for rust.
2215
//! Structure inspired by github user davidhalperin's gist.
2316

branches/try/src/libnum/bigint.rs

Lines changed: 1 addition & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
use Integer;
6060
use rand::Rng;
6161

62-
use std::{cmp, fmt, hash};
62+
use std::{cmp, fmt};
6363
use std::default::Default;
6464
use std::from_str::FromStr;
6565
use std::num::CheckedDiv;
@@ -150,22 +150,6 @@ impl Default for BigUint {
150150
fn default() -> BigUint { Zero::zero() }
151151
}
152152

153-
impl<S: hash::Writer> hash::Hash<S> for BigUint {
154-
fn hash(&self, state: &mut S) {
155-
// hash 0 in case it's all 0's
156-
0u32.hash(state);
157-
158-
let mut found_first_value = false;
159-
for elem in self.data.iter().rev() {
160-
// don't hash any leading 0's, they shouldn't affect the hash
161-
if found_first_value || *elem != 0 {
162-
found_first_value = true;
163-
elem.hash(state);
164-
}
165-
}
166-
}
167-
}
168-
169153
impl fmt::Show for BigUint {
170154
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
171155
write!(f, "{}", self.to_str_radix(10))
@@ -897,13 +881,6 @@ impl fmt::Show for BigInt {
897881
}
898882
}
899883

900-
impl<S: hash::Writer> hash::Hash<S> for BigInt {
901-
fn hash(&self, state: &mut S) {
902-
(self.sign == Plus).hash(state);
903-
self.data.hash(state);
904-
}
905-
}
906-
907884
impl FromStr for BigInt {
908885
#[inline]
909886
fn from_str(s: &str) -> Option<BigInt> {
@@ -1432,7 +1409,6 @@ mod biguint_tests {
14321409
use std::num::CheckedDiv;
14331410
use std::rand::task_rng;
14341411
use std::u64;
1435-
use std::hash::hash;
14361412

14371413
#[test]
14381414
fn test_from_slice() {
@@ -1484,19 +1460,6 @@ mod biguint_tests {
14841460
}
14851461
}
14861462

1487-
#[test]
1488-
fn test_hash() {
1489-
let a = BigUint::new(vec!());
1490-
let b = BigUint::new(vec!(0));
1491-
let c = BigUint::new(vec!(1));
1492-
let d = BigUint::new(vec!(1,0,0,0,0,0));
1493-
let e = BigUint::new(vec!(0,0,0,0,0,1));
1494-
assert!(hash(&a) == hash(&b));
1495-
assert!(hash(&b) != hash(&c));
1496-
assert!(hash(&c) == hash(&d));
1497-
assert!(hash(&d) != hash(&e));
1498-
}
1499-
15001463
#[test]
15011464
fn test_bitand() {
15021465
fn check(left: &[BigDigit],
@@ -2294,7 +2257,6 @@ mod bigint_tests {
22942257
use std::num::{ToPrimitive, FromPrimitive};
22952258
use std::rand::task_rng;
22962259
use std::u64;
2297-
use std::hash::hash;
22982260

22992261
#[test]
23002262
fn test_from_biguint() {
@@ -2352,21 +2314,6 @@ mod bigint_tests {
23522314
}
23532315
}
23542316

2355-
#[test]
2356-
fn test_hash() {
2357-
let a = BigInt::new(Zero, vec!());
2358-
let b = BigInt::new(Zero, vec!(0));
2359-
let c = BigInt::new(Plus, vec!(1));
2360-
let d = BigInt::new(Plus, vec!(1,0,0,0,0,0));
2361-
let e = BigInt::new(Plus, vec!(0,0,0,0,0,1));
2362-
let f = BigInt::new(Minus, vec!(1));
2363-
assert!(hash(&a) == hash(&b));
2364-
assert!(hash(&b) != hash(&c));
2365-
assert!(hash(&c) == hash(&d));
2366-
assert!(hash(&d) != hash(&e));
2367-
assert!(hash(&c) != hash(&f));
2368-
}
2369-
23702317
#[test]
23712318
fn test_convert_i64() {
23722319
fn check(b1: BigInt, i: i64) {

branches/try/src/libnum/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
//! [newt]: https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method
4444
4545
#![feature(macro_rules)]
46-
#![feature(default_type_params)]
4746

4847
#![crate_name = "num"]
4948
#![experimental]

branches/try/src/librustc/back/link.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,6 +1475,9 @@ 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");
14781481
}
14791482

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

0 commit comments

Comments
 (0)