Skip to content

Commit 8d62d5f

Browse files
committed
---
yaml --- r: 159603 b: refs/heads/auto c: 607eb12 h: refs/heads/master i: 159601: f0b18b2 159599: 333e763 v: v3
1 parent 27be231 commit 8d62d5f

File tree

238 files changed

+2425
-2361
lines changed

Some content is hidden

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

238 files changed

+2425
-2361
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: d91a015ab4c538f02fbbc03dfb08193a381c2e3b
13+
refs/heads/auto: 607eb12ab7683c8d84460edd50971944f5994f92
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/doc/guide-lifetimes.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ expensive. So we'd like to define a function that takes the points just as
5151
a reference.
5252

5353
~~~
54-
# use std::num::Float;
5554
# struct Point {x: f64, y: f64}
5655
# fn sqrt(f: f64) -> f64 { 0.0 }
5756
fn compute_distance(p1: &Point, p2: &Point) -> f64 {

branches/auto/src/doc/guide-tasks.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ Here is another example showing how futures allow you to background
225225
computations. The workload will be distributed on the available cores.
226226

227227
```{rust}
228-
# use std::num::Float;
229228
# use std::sync::Future;
230229
fn partial_sum(start: uint) -> f64 {
231230
let mut local_sum = 0f64;
@@ -263,7 +262,6 @@ several computations on a single large vector of floats. Each task needs the
263262
full vector to perform its duty.
264263

265264
```{rust}
266-
use std::num::Float;
267265
use std::rand;
268266
use std::sync::Arc;
269267

branches/auto/src/doc/guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5274,7 +5274,7 @@ let result = task::try(proc() {
52745274

52755275
This task will randomly panic or succeed. `task::try` returns a `Result`
52765276
type, so we can handle the response like any other computation that may
5277-
fail.
5277+
panic.
52785278

52795279
# Macros
52805280

branches/auto/src/doc/po4a.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
[type: text] src/doc/guide-tasks.md $lang:doc/l10n/$lang/guide-tasks.md
2020
[type: text] src/doc/guide-testing.md $lang:doc/l10n/$lang/guide-testing.md
2121
[type: text] src/doc/guide-unsafe.md $lang:doc/l10n/$lang/guide-unsafe.md
22-
[type: text] src/doc/guide-unsafe.md $lang:doc/l10n/$lang/guide-crates.md
22+
[type: text] src/doc/guide-crates.md $lang:doc/l10n/$lang/guide-crates.md
2323
[type: text] src/doc/guide.md $lang:doc/l10n/$lang/guide.md
2424
[type: text] src/doc/index.md $lang:doc/l10n/$lang/index.md
2525
[type: text] src/doc/intro.md $lang:doc/l10n/$lang/intro.md

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176
"false" "fn" "for"
177177
"if" "impl" "in"
178178
"let" "loop"
179-
"match" "mod" "move" "mut"
179+
"match" "mod" "mut"
180180
"priv" "proc" "pub"
181181
"ref" "return"
182182
"self" "static" "struct" "super"

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
<item> loop </item>
3535
<item> match </item>
3636
<item> mod </item>
37-
<item> move </item>
3837
<item> mut </item>
3938
<item> priv </item>
4039
<item> pub </item>

branches/auto/src/etc/make-win-dist.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def make_win_dist(dist_root, target_triple):
6262
"libcomctl32.a",
6363
"libcomdlg32.a",
6464
"libcrypt32.a",
65+
"libctl3d32.a",
6566
"libgdi32.a",
6667
"libimagehlp.a",
6768
"libiphlpapi.a",

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ syn keyword rustTrait FromIterator IntoIterator Extend ExactSize
9797
syn keyword rustTrait Iterator DoubleEndedIterator
9898
syn keyword rustTrait RandomAccessIterator CloneableIterator
9999
syn keyword rustTrait OrdIterator MutableDoubleEndedIterator
100-
syn keyword rustTrait NumCast Int SignedInt UnsignedInt Float
100+
syn keyword rustTrait Num NumCast CheckedAdd CheckedSub CheckedMul CheckedDiv
101+
syn keyword rustTrait Signed Unsigned Primitive Int Float
101102
syn keyword rustTrait FloatMath ToPrimitive FromPrimitive
102103
syn keyword rustTrait Box
103104
syn keyword rustTrait GenericPath Path PosixPath WindowsPath

branches/auto/src/liballoc/boxed.rs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,50 @@ impl<T: Clone> Clone for Box<T> {
6565
}
6666
}
6767

68+
// NOTE(stage0): remove impl after a snapshot
69+
#[cfg(stage0)]
70+
impl<T:PartialEq> PartialEq for Box<T> {
71+
#[inline]
72+
fn eq(&self, other: &Box<T>) -> bool { *(*self) == *(*other) }
73+
#[inline]
74+
fn ne(&self, other: &Box<T>) -> bool { *(*self) != *(*other) }
75+
}
76+
// NOTE(stage0): remove impl after a snapshot
77+
#[cfg(stage0)]
78+
impl<T:PartialOrd> PartialOrd for Box<T> {
79+
#[inline]
80+
fn partial_cmp(&self, other: &Box<T>) -> Option<Ordering> {
81+
(**self).partial_cmp(&**other)
82+
}
83+
#[inline]
84+
fn lt(&self, other: &Box<T>) -> bool { *(*self) < *(*other) }
85+
#[inline]
86+
fn le(&self, other: &Box<T>) -> bool { *(*self) <= *(*other) }
87+
#[inline]
88+
fn ge(&self, other: &Box<T>) -> bool { *(*self) >= *(*other) }
89+
#[inline]
90+
fn gt(&self, other: &Box<T>) -> bool { *(*self) > *(*other) }
91+
}
92+
// NOTE(stage0): remove impl after a snapshot
93+
#[cfg(stage0)]
94+
impl<T: Ord> Ord for Box<T> {
95+
#[inline]
96+
fn cmp(&self, other: &Box<T>) -> Ordering {
97+
(**self).cmp(&**other)
98+
}
99+
}
100+
// NOTE(stage0): remove impl after a snapshot
101+
#[cfg(stage0)]
102+
impl<T: Eq> Eq for Box<T> {}
103+
104+
#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
68105
impl<Sized? T: PartialEq> PartialEq for Box<T> {
69106
#[inline]
70107
fn eq(&self, other: &Box<T>) -> bool { PartialEq::eq(&**self, &**other) }
71108
#[inline]
72109
fn ne(&self, other: &Box<T>) -> bool { PartialEq::ne(&**self, &**other) }
73110
}
111+
#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
74112
impl<Sized? T: PartialOrd> PartialOrd for Box<T> {
75113
#[inline]
76114
fn partial_cmp(&self, other: &Box<T>) -> Option<Ordering> {
@@ -85,12 +123,14 @@ impl<Sized? T: PartialOrd> PartialOrd for Box<T> {
85123
#[inline]
86124
fn gt(&self, other: &Box<T>) -> bool { PartialOrd::gt(&**self, &**other) }
87125
}
126+
#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
88127
impl<Sized? T: Ord> Ord for Box<T> {
89128
#[inline]
90129
fn cmp(&self, other: &Box<T>) -> Ordering {
91130
Ord::cmp(&**self, &**other)
92131
}
93132
}
133+
#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
94134
impl<Sized? T: Eq> Eq for Box<T> {}
95135

96136
/// Extension methods for an owning `Any` trait object.

branches/auto/src/libarena/lib.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ use std::cmp;
3838
use std::intrinsics::{TyDesc, get_tydesc};
3939
use std::intrinsics;
4040
use std::mem;
41-
use std::num::{Int, UnsignedInt};
41+
use std::num;
4242
use std::ptr;
4343
use std::rc::Rc;
4444
use std::rt::heap::{allocate, deallocate};
@@ -132,7 +132,7 @@ impl Drop for Arena {
132132

133133
#[inline]
134134
fn round_up(base: uint, align: uint) -> uint {
135-
(base.checked_add(align - 1)).unwrap() & !(align - 1)
135+
(base.checked_add(&(align - 1))).unwrap() & !(align - 1)
136136
}
137137

138138
// Walk down a chunk, running the destructors for any objects stored
@@ -187,7 +187,7 @@ impl Arena {
187187
self.chunks.borrow_mut().push(self.copy_head.borrow().clone());
188188

189189
*self.copy_head.borrow_mut() =
190-
chunk((new_min_chunk_size + 1u).next_power_of_two(), true);
190+
chunk(num::next_power_of_two(new_min_chunk_size + 1u), true);
191191

192192
return self.alloc_copy_inner(n_bytes, align);
193193
}
@@ -228,7 +228,7 @@ impl Arena {
228228
self.chunks.borrow_mut().push(self.head.borrow().clone());
229229

230230
*self.head.borrow_mut() =
231-
chunk((new_min_chunk_size + 1u).next_power_of_two(), false);
231+
chunk(num::next_power_of_two(new_min_chunk_size + 1u), false);
232232

233233
return self.alloc_noncopy_inner(n_bytes, align);
234234
}
@@ -376,8 +376,8 @@ fn calculate_size<T>(capacity: uint) -> uint {
376376
let mut size = mem::size_of::<TypedArenaChunk<T>>();
377377
size = round_up(size, mem::min_align_of::<T>());
378378
let elem_size = mem::size_of::<T>();
379-
let elems_size = elem_size.checked_mul(capacity).unwrap();
380-
size = size.checked_add(elems_size).unwrap();
379+
let elems_size = elem_size.checked_mul(&capacity).unwrap();
380+
size = size.checked_add(&elems_size).unwrap();
381381
size
382382
}
383383

@@ -432,7 +432,7 @@ impl<T> TypedArenaChunk<T> {
432432
#[inline]
433433
fn end(&self) -> *const u8 {
434434
unsafe {
435-
let size = mem::size_of::<T>().checked_mul(self.capacity).unwrap();
435+
let size = mem::size_of::<T>().checked_mul(&self.capacity).unwrap();
436436
self.start().offset(size as int)
437437
}
438438
}
@@ -481,7 +481,7 @@ impl<T> TypedArena<T> {
481481
fn grow(&self) {
482482
unsafe {
483483
let chunk = *self.first.borrow_mut();
484-
let new_capacity = (*chunk).capacity.checked_mul(2).unwrap();
484+
let new_capacity = (*chunk).capacity.checked_mul(&2).unwrap();
485485
let chunk = TypedArenaChunk::<T>::new(chunk, new_capacity);
486486
self.ptr.set((*chunk).start() as *const T);
487487
self.end.set((*chunk).end() as *const T);

branches/auto/src/libcollections/bit.rs

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
//!
2323
//! ```
2424
//! use std::collections::{BitvSet, Bitv};
25-
//! use std::num::Float;
2625
//! use std::iter;
2726
//!
2827
//! let max_prime = 10000;
@@ -70,7 +69,6 @@ use core::default::Default;
7069
use core::fmt;
7170
use core::iter::{Chain, Enumerate, Repeat, Skip, Take};
7271
use core::iter;
73-
use core::num::Int;
7472
use core::slice;
7573
use core::u32;
7674
use std::hash;
@@ -258,9 +256,9 @@ impl Bitv {
258256

259257
/// Retrieves the value at index `i`.
260258
///
261-
/// # Panics
259+
/// # Failure
262260
///
263-
/// Panics if `i` is out of bounds.
261+
/// Fails if `i` is out of bounds.
264262
///
265263
/// # Example
266264
///
@@ -285,9 +283,9 @@ impl Bitv {
285283

286284
/// Sets the value of a bit at a index `i`.
287285
///
288-
/// # Panics
286+
/// # Failure
289287
///
290-
/// Panics if `i` is out of bounds.
288+
/// Fails if `i` is out of bounds.
291289
///
292290
/// # Example
293291
///
@@ -353,9 +351,9 @@ impl Bitv {
353351
/// Sets `self` to the union of `self` and `other`. Both bitvectors must be
354352
/// the same length. Returns `true` if `self` changed.
355353
///
356-
/// # Panics
354+
/// # Failure
357355
///
358-
/// Panics if the bitvectors are of different lengths.
356+
/// Fails if the bitvectors are of different lengths.
359357
///
360358
/// # Example
361359
///
@@ -383,9 +381,9 @@ impl Bitv {
383381
/// Sets `self` to the intersection of `self` and `other`. Both bitvectors
384382
/// must be the same length. Returns `true` if `self` changed.
385383
///
386-
/// # Panics
384+
/// # Failure
387385
///
388-
/// Panics if the bitvectors are of different lengths.
386+
/// Fails if the bitvectors are of different lengths.
389387
///
390388
/// # Example
391389
///
@@ -413,9 +411,9 @@ impl Bitv {
413411
/// element of `other` at the same index. Both bitvectors must be the same
414412
/// length. Returns `true` if `self` changed.
415413
///
416-
/// # Panics
414+
/// # Failure
417415
///
418-
/// Panics if the bitvectors are of different length.
416+
/// Fails if the bitvectors are of different length.
419417
///
420418
/// # Example
421419
///
@@ -580,9 +578,9 @@ impl Bitv {
580578
/// Compares a `Bitv` to a slice of `bool`s.
581579
/// Both the `Bitv` and slice must have the same length.
582580
///
583-
/// # Panics
581+
/// # Failure
584582
///
585-
/// Panics if the the `Bitv` and slice are of different length.
583+
/// Fails if the the `Bitv` and slice are of different length.
586584
///
587585
/// # Example
588586
///
@@ -718,7 +716,7 @@ impl Bitv {
718716

719717
/// Shortens by one element and returns the removed element.
720718
///
721-
/// # Panics
719+
/// # Failure
722720
///
723721
/// Assert if empty.
724722
///

branches/auto/src/libcollections/enum_set.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
1616
use core::prelude::*;
1717
use core::fmt;
18-
use core::num::Int;
1918

2019
// FIXME(contentions): implement union family of methods? (general design may be wrong here)
2120

branches/auto/src/libcollections/hash/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ use alloc::boxed::Box;
6969
use alloc::rc::Rc;
7070
use core::intrinsics::TypeId;
7171
use core::mem;
72-
use core::num::Int;
7372

7473
use vec::Vec;
7574

branches/auto/src/libcollections/str.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,13 @@ impl<'a> PartialOrd for MaybeOwned<'a> {
534534
}
535535

536536
impl<'a> Ord for MaybeOwned<'a> {
537+
// NOTE(stage0): remove method after a snapshot
538+
#[cfg(stage0)]
539+
#[inline]
540+
fn cmp(&self, other: &MaybeOwned) -> Ordering {
541+
self.as_slice().cmp(&other.as_slice())
542+
}
543+
#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
537544
#[inline]
538545
fn cmp(&self, other: &MaybeOwned) -> Ordering {
539546
self.as_slice().cmp(other.as_slice())

branches/auto/src/libcollections/string.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,9 +498,9 @@ impl String {
498498

499499
/// Shortens a string to the specified length.
500500
///
501-
/// # Panics
501+
/// # Failure
502502
///
503-
/// Panics if `new_len` > current length,
503+
/// Fails if `new_len` > current length,
504504
/// or if `new_len` is not a character boundary.
505505
///
506506
/// # Example

0 commit comments

Comments
 (0)