Skip to content

Commit 61b4506

Browse files
committed
---
yaml --- r: 127971 b: refs/heads/auto c: 4f5b692 h: refs/heads/master i: 127969: 5b0294a 127967: f52f04d v: v3
1 parent 9eea225 commit 61b4506

Some content is hidden

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

104 files changed

+267
-1680
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 9d45d63d0d18f21f74c8a2a4e5367a785932f64e
16+
refs/heads/auto: 4f5b6927e8e428239082ecc17b85a0506bcc9a65
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/compiletest/runtest.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ use std::os;
3030
use std::str;
3131
use std::string::String;
3232
use std::task;
33-
use std::time::Duration;
3433
use test::MetricMap;
3534

3635
pub fn run(config: Config, testfile: String) {
@@ -401,7 +400,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
401400
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
402401
loop {
403402
//waiting 1 second for gdbserver start
404-
timer::sleep(Duration::milliseconds(1000));
403+
timer::sleep(1000);
405404
let result = task::try(proc() {
406405
tcp::TcpStream::connect("127.0.0.1", 5039).unwrap();
407406
});

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ itself, yet again implying that they are not defined in the standard library.
128128
The full complement of runtime features is defined by the [`Runtime`
129129
trait](std/rt/trait.Runtime.html) and the [`Task`
130130
struct](std/rt/task/struct.Task.html). A `Task` is constant among all runtime
131-
implementations, but each runtime has its own implementation of the
131+
implementations, but each runtime implements has its own implementation of the
132132
`Runtime` trait.
133133

134134
The local `Task` stores the runtime value inside of itself, and then ownership

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ per-iteration speed of.
198198

199199
For benchmarks relating to processing/generating data, one can set the
200200
`bytes` field to the number of bytes consumed/produced in each
201-
iteration; this will be used to show the throughput of the benchmark.
201+
iteration; this will used to show the throughput of the benchmark.
202202
This must be the amount used in each iteration, *not* the total
203203
amount.
204204

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ explicitly with, respectively, `value as *const T` and `value as *mut T`).
137137

138138
Going the opposite direction, from `*const` to a reference `&`, is not
139139
safe. A `&T` is always valid, and so, at a minimum, the raw pointer
140-
`*const T` has to point to a valid instance of type `T`. Furthermore,
140+
`*const T` has to be a valid to a valid instance of type `T`. Furthermore,
141141
the resulting pointer must satisfy the aliasing and mutability laws of
142142
references. The compiler assumes these properties are true for any
143143
references, no matter how they are created, and so any conversion from

branches/auto/src/doc/guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ This is not the same as this, which won't compile:
666666
```{ignore}
667667
let x = 5i;
668668
669-
let y: int = if x == 5i { 10i; } else { 15i; };
669+
let y: int = if x == 5 { 10i; } else { 15i; };
670670
```
671671

672672
Note the semicolons after the 10 and 15. Rust will give us the following error:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ mod tests {
296296
use std::prelude::*;
297297
use std::mem;
298298

299-
use slice::ImmutableVector;
299+
use slice::ImmutableSlice;
300300
use super::{Hash, Hasher, Writer};
301301

302302
struct MyWriterHasher;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ mod tests {
275275

276276
use str::Str;
277277
use string::String;
278-
use slice::{Vector, ImmutableVector};
278+
use slice::{Vector, ImmutableSlice};
279279
use vec::Vec;
280280

281281
use super::super::{Hash, Writer};

branches/auto/src/libcollections/slice.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ represents iteration over a slice.
4545
## Traits
4646
4747
A number of traits add methods that allow you to accomplish tasks with slices.
48-
These traits include `ImmutableVector`, which is defined for `&[T]` types,
49-
and `MutableVector`, defined for `&mut [T]` types.
48+
These traits include `ImmutableSlice`, which is defined for `&[T]` types,
49+
and `MutableSlice`, defined for `&mut [T]` types.
5050
5151
An example is the method `.slice(a, b)` that returns an immutable "view" into
5252
a `Vec` or another slice from the index interval `[a, b)`:
@@ -98,10 +98,10 @@ use {Collection, MutableSeq};
9898
use vec::Vec;
9999

100100
pub use core::slice::{ref_slice, mut_ref_slice, Splits, Windows};
101-
pub use core::slice::{Chunks, Vector, ImmutableVector, ImmutableEqVector};
102-
pub use core::slice::{ImmutableOrdVector, MutableVector, Items, MutItems};
101+
pub use core::slice::{Chunks, Vector, ImmutableSlice, ImmutableEqSlice};
102+
pub use core::slice::{ImmutableOrdSlice, MutableSlice, Items, MutItems};
103103
pub use core::slice::{MutSplits, MutChunks};
104-
pub use core::slice::{bytes, MutableCloneableVector};
104+
pub use core::slice::{bytes, MutableCloneableSlice};
105105

106106
// Functional utilities
107107

@@ -558,7 +558,7 @@ fn merge_sort<T>(v: &mut [T], compare: |&T, &T| -> Ordering) {
558558

559559
/// Extension methods for vectors such that their elements are
560560
/// mutable.
561-
pub trait MutableVectorAllocating<'a, T> {
561+
pub trait MutableSliceAllocating<'a, T> {
562562
/// Sort the vector, in place, using `compare` to compare
563563
/// elements.
564564
///
@@ -604,7 +604,7 @@ pub trait MutableVectorAllocating<'a, T> {
604604
fn move_from(self, src: Vec<T>, start: uint, end: uint) -> uint;
605605
}
606606

607-
impl<'a,T> MutableVectorAllocating<'a, T> for &'a mut [T] {
607+
impl<'a,T> MutableSliceAllocating<'a, T> for &'a mut [T] {
608608
#[inline]
609609
fn sort_by(self, compare: |&T, &T| -> Ordering) {
610610
merge_sort(self, compare)
@@ -621,7 +621,7 @@ impl<'a,T> MutableVectorAllocating<'a, T> for &'a mut [T] {
621621

622622
/// Methods for mutable vectors with orderable elements, such as
623623
/// in-place sorting.
624-
pub trait MutableOrdVector<T> {
624+
pub trait MutableOrdSlice<T> {
625625
/// Sort the vector, in place.
626626
///
627627
/// This is equivalent to `self.sort_by(|a, b| a.cmp(b))`.
@@ -667,7 +667,7 @@ pub trait MutableOrdVector<T> {
667667
fn prev_permutation(self) -> bool;
668668
}
669669

670-
impl<'a, T: Ord> MutableOrdVector<T> for &'a mut [T] {
670+
impl<'a, T: Ord> MutableOrdSlice<T> for &'a mut [T] {
671671
#[inline]
672672
fn sort(self) {
673673
self.sort_by(|a,b| a.cmp(b))

branches/auto/src/libcollections/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ mod tests {
894894
use {Collection, MutableSeq};
895895

896896
use super::*;
897-
use std::slice::{Vector, ImmutableVector};
897+
use std::slice::{Vector, ImmutableSlice};
898898
use string::String;
899899
use vec::Vec;
900900

branches/auto/src/libcollections/vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use core::ptr;
2424
use core::uint;
2525

2626
use {Collection, Mutable, MutableSeq};
27-
use slice::{MutableOrdVector, MutableVectorAllocating, CloneableVector};
27+
use slice::{MutableOrdSlice, MutableSliceAllocating, CloneableVector};
2828
use slice::{Items, MutItems};
2929

3030

branches/auto/src/libcore/fmt/float.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use iter::{range, DoubleEndedIterator};
1717
use num::{Float, FPNaN, FPInfinite, ToPrimitive, Primitive};
1818
use num::{Zero, One, cast};
1919
use result::Ok;
20-
use slice::{ImmutableVector, MutableVector};
20+
use slice::{ImmutableSlice, MutableSlice};
2121
use slice;
2222
use str::StrSlice;
2323

branches/auto/src/libcore/fmt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use option::{Option, Some, None};
2424
use ops::Deref;
2525
use result::{Ok, Err};
2626
use result;
27-
use slice::{Vector, ImmutableVector};
27+
use slice::{Vector, ImmutableSlice};
2828
use slice;
2929
use str::StrSlice;
3030
use str;

branches/auto/src/libcore/fmt/num.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use collections::Collection;
1818
use fmt;
1919
use iter::DoubleEndedIterator;
2020
use num::{Int, cast, zero};
21-
use slice::{ImmutableVector, MutableVector};
21+
use slice::{ImmutableSlice, MutableSlice};
2222

2323
/// A type that represents a specific radix
2424
#[doc(hidden)]

branches/auto/src/libcore/prelude.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,6 @@ pub use str::{Str, StrSlice};
6161
pub use tuple::{Tuple1, Tuple2, Tuple3, Tuple4};
6262
pub use tuple::{Tuple5, Tuple6, Tuple7, Tuple8};
6363
pub use tuple::{Tuple9, Tuple10, Tuple11, Tuple12};
64-
pub use slice::{ImmutableEqVector, ImmutableOrdVector};
65-
pub use slice::{MutableVector};
66-
pub use slice::{Vector, ImmutableVector};
64+
pub use slice::{ImmutableEqSlice, ImmutableOrdSlice};
65+
pub use slice::{MutableSlice};
66+
pub use slice::{Vector, ImmutableSlice};

branches/auto/src/libcore/slice.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ use raw::{Repr, Slice};
5454
//
5555

5656
/// Extension methods for vectors
57-
pub trait ImmutableVector<'a, T> {
57+
pub trait ImmutableSlice<'a, T> {
5858
/**
5959
* Returns a slice of self spanning the interval [`start`, `end`).
6060
*
@@ -234,7 +234,7 @@ pub trait ImmutableVector<'a, T> {
234234
fn pop_ref(&mut self) -> Option<&'a T>;
235235
}
236236

237-
impl<'a,T> ImmutableVector<'a, T> for &'a [T] {
237+
impl<'a,T> ImmutableSlice<'a, T> for &'a [T] {
238238
#[inline]
239239
fn slice(&self, start: uint, end: uint) -> &'a [T] {
240240
assert!(start <= end);
@@ -401,7 +401,7 @@ impl<'a,T> ImmutableVector<'a, T> for &'a [T] {
401401

402402
/// Extension methods for vectors such that their elements are
403403
/// mutable.
404-
pub trait MutableVector<'a, T> {
404+
pub trait MutableSlice<'a, T> {
405405
/// Returns a mutable reference to the element at the given index,
406406
/// or `None` if the index is out of bounds
407407
fn get_mut(self, index: uint) -> Option<&'a mut T>;
@@ -607,7 +607,7 @@ pub trait MutableVector<'a, T> {
607607
unsafe fn copy_memory(self, src: &[T]);
608608
}
609609

610-
impl<'a,T> MutableVector<'a, T> for &'a mut [T] {
610+
impl<'a,T> MutableSlice<'a, T> for &'a mut [T] {
611611
#[inline]
612612
fn get_mut(self, index: uint) -> Option<&'a mut T> {
613613
if index < self.len() { Some(&mut self[index]) } else { None }
@@ -755,7 +755,7 @@ impl<'a,T> MutableVector<'a, T> for &'a mut [T] {
755755
}
756756

757757
/// Extension methods for vectors contain `PartialEq` elements.
758-
pub trait ImmutableEqVector<T:PartialEq> {
758+
pub trait ImmutableEqSlice<T:PartialEq> {
759759
/// Find the first index containing a matching value
760760
fn position_elem(&self, t: &T) -> Option<uint>;
761761

@@ -772,7 +772,7 @@ pub trait ImmutableEqVector<T:PartialEq> {
772772
fn ends_with(&self, needle: &[T]) -> bool;
773773
}
774774

775-
impl<'a,T:PartialEq> ImmutableEqVector<T> for &'a [T] {
775+
impl<'a,T:PartialEq> ImmutableEqSlice<T> for &'a [T] {
776776
#[inline]
777777
fn position_elem(&self, x: &T) -> Option<uint> {
778778
self.iter().position(|y| *x == *y)
@@ -802,7 +802,7 @@ impl<'a,T:PartialEq> ImmutableEqVector<T> for &'a [T] {
802802
}
803803

804804
/// Extension methods for vectors containing `Ord` elements.
805-
pub trait ImmutableOrdVector<T: Ord> {
805+
pub trait ImmutableOrdSlice<T: Ord> {
806806
/**
807807
* Binary search a sorted vector for a given element.
808808
*
@@ -811,22 +811,22 @@ pub trait ImmutableOrdVector<T: Ord> {
811811
fn bsearch_elem(&self, x: &T) -> Option<uint>;
812812
}
813813

814-
impl<'a, T: Ord> ImmutableOrdVector<T> for &'a [T] {
814+
impl<'a, T: Ord> ImmutableOrdSlice<T> for &'a [T] {
815815
fn bsearch_elem(&self, x: &T) -> Option<uint> {
816816
self.bsearch(|p| p.cmp(x))
817817
}
818818
}
819819

820820
/// Trait for &[T] where T is Cloneable
821-
pub trait MutableCloneableVector<T> {
821+
pub trait MutableCloneableSlice<T> {
822822
/// Copies as many elements from `src` as it can into `self` (the
823823
/// shorter of `self.len()` and `src.len()`). Returns the number
824824
/// of elements copied.
825825
///
826826
/// # Example
827827
///
828828
/// ```rust
829-
/// use std::slice::MutableCloneableVector;
829+
/// use std::slice::MutableCloneableSlice;
830830
///
831831
/// let mut dst = [0i, 0, 0];
832832
/// let src = [1i, 2];
@@ -841,7 +841,7 @@ pub trait MutableCloneableVector<T> {
841841
fn copy_from(self, &[T]) -> uint;
842842
}
843843

844-
impl<'a, T:Clone> MutableCloneableVector<T> for &'a mut [T] {
844+
impl<'a, T:Clone> MutableCloneableSlice<T> for &'a mut [T] {
845845
#[inline]
846846
fn copy_from(self, src: &[T]) -> uint {
847847
for (a, b) in self.mut_iter().zip(src.iter()) {
@@ -1413,7 +1413,7 @@ pub mod raw {
14131413
pub mod bytes {
14141414
use collections::Collection;
14151415
use ptr;
1416-
use slice::MutableVector;
1416+
use slice::MutableSlice;
14171417

14181418
/// A trait for operations on mutable `[u8]`s.
14191419
pub trait MutableByteVector {

branches/auto/src/libcore/str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use iter::range;
3030
use num::{CheckedMul, Saturating};
3131
use option::{Option, None, Some};
3232
use raw::Repr;
33-
use slice::ImmutableVector;
33+
use slice::ImmutableSlice;
3434
use slice;
3535
use uint;
3636

@@ -964,7 +964,7 @@ pub mod raw {
964964
use collections::Collection;
965965
use ptr::RawPtr;
966966
use raw::Slice;
967-
use slice::{ImmutableVector};
967+
use slice::{ImmutableSlice};
968968
use str::{is_utf8, StrSlice};
969969

970970
/// Converts a slice of bytes to a string slice without checking

branches/auto/src/libgreen/sched.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,6 @@ mod test {
10291029
use std::rt::task::TaskOpts;
10301030
use std::rt::task::Task;
10311031
use std::rt::local::Local;
1032-
use std::time::Duration;
10331032

10341033
use {TaskState, PoolConfig, SchedPool};
10351034
use basic;
@@ -1292,7 +1291,7 @@ mod test {
12921291
// doesn't exit before emptying the work queue
12931292
pool.spawn(TaskOpts::new(), proc() {
12941293
spawn(proc() {
1295-
timer::sleep(Duration::milliseconds(10));
1294+
timer::sleep(10);
12961295
});
12971296
});
12981297

branches/auto/src/libregex/vm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
use std::cmp;
3737
use std::mem;
38-
use std::slice::MutableVector;
38+
use std::slice::MutableSlice;
3939
use compile::{
4040
Program,
4141
Match, OneChar, CharClass, Any, EmptyBegin, EmptyEnd, EmptyWordBoundary,

branches/auto/src/librlibc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ mod test {
112112
use core::iter::Iterator;
113113
use core::collections::Collection;
114114
use core::str::StrSlice;
115-
use core::slice::{MutableVector, ImmutableVector};
115+
use core::slice::{MutableSlice, ImmutableSlice};
116116

117117
use super::{memcmp, memset, memcpy, memmove};
118118

branches/auto/src/librustc/driver/driver.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,8 @@ pub fn phase_3_run_analysis_passes(sess: Session,
360360
plugin::build::find_plugin_registrar(
361361
sess.diagnostic(), krate)));
362362

363-
let (freevars, capture_modes) =
364-
time(time_passes, "freevar finding", (), |_|
365-
freevars::annotate_freevars(&def_map, krate));
363+
let freevars = time(time_passes, "freevar finding", (), |_|
364+
freevars::annotate_freevars(&def_map, krate));
366365

367366
let region_map = time(time_passes, "region resolution", (), |_|
368367
middle::region::resolve_crate(&sess, krate));
@@ -373,15 +372,8 @@ pub fn phase_3_run_analysis_passes(sess: Session,
373372
let stability_index = time(time_passes, "stability index", (), |_|
374373
stability::Index::build(krate));
375374

376-
let ty_cx = ty::mk_ctxt(sess,
377-
def_map,
378-
named_region_map,
379-
ast_map,
380-
freevars,
381-
capture_modes,
382-
region_map,
383-
lang_items,
384-
stability_index);
375+
let ty_cx = ty::mk_ctxt(sess, def_map, named_region_map, ast_map,
376+
freevars, region_map, lang_items, stability_index);
385377

386378
// passes are timed inside typeck
387379
typeck::check_crate(&ty_cx, trait_map, krate);

branches/auto/src/librustc/metadata/common.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,9 @@ pub enum astencode_tag { // Reserves 0x40 -- 0x5f
141141
tag_table_capture_map = 0x53,
142142
tag_table_unboxed_closure_type = 0x54,
143143
tag_table_upvar_borrow_map = 0x55,
144-
tag_table_capture_modes = 0x56,
145144
}
146145
static first_astencode_tag: uint = tag_ast as uint;
147-
static last_astencode_tag: uint = tag_table_capture_modes as uint;
146+
static last_astencode_tag: uint = tag_table_upvar_borrow_map as uint;
148147
impl astencode_tag {
149148
pub fn from_uint(value : uint) -> Option<astencode_tag> {
150149
let is_a_tag = first_astencode_tag <= value && value <= last_astencode_tag;

0 commit comments

Comments
 (0)