Skip to content

Commit 7a20020

Browse files
committed
---
yaml --- r: 106120 b: refs/heads/auto c: 068740b h: refs/heads/master v: v3
1 parent 63bb1b6 commit 7a20020

File tree

317 files changed

+6532
-8498
lines changed

Some content is hidden

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

317 files changed

+6532
-8498
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: 8cfef59cc0922f15979bf4e8a0b344cecfa8d9e2
16+
refs/heads/auto: 068740b3433099d148c8e2d4bcc9b25309f40701
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use std::io;
3232
use std::os;
3333
use std::str;
3434
use std::task;
35-
use std::slice;
35+
use std::vec;
3636

3737
use test::MetricMap;
3838

@@ -500,7 +500,7 @@ fn check_expected_errors(expected_errors: ~[errors::ExpectedError],
500500
proc_res: &ProcRes) {
501501

502502
// true if we found the error in question
503-
let mut found_flags = slice::from_elem(
503+
let mut found_flags = vec::from_elem(
504504
expected_errors.len(), false);
505505

506506
if proc_res.status.success() {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ The raw C API needs to be wrapped to provide memory safety and make use of highe
7171
like vectors. A library can choose to expose only the safe, high-level interface and hide the unsafe
7272
internal details.
7373

74-
Wrapping the functions which expect buffers involves using the `slice::raw` module to manipulate Rust
74+
Wrapping the functions which expect buffers involves using the `vec::raw` module to manipulate Rust
7575
vectors as pointers to memory. Rust's vectors are guaranteed to be a contiguous block of memory. The
7676
length is number of elements currently contained, and the capacity is the total size in elements of
7777
the allocated memory. The length is less than or equal to the capacity.
@@ -103,7 +103,7 @@ pub fn compress(src: &[u8]) -> ~[u8] {
103103
let psrc = src.as_ptr();
104104
105105
let mut dstlen = snappy_max_compressed_length(srclen);
106-
let mut dst = slice::with_capacity(dstlen as uint);
106+
let mut dst = vec::with_capacity(dstlen as uint);
107107
let pdst = dst.as_mut_ptr();
108108
109109
snappy_compress(psrc, srclen, pdst, &mut dstlen);
@@ -125,7 +125,7 @@ pub fn uncompress(src: &[u8]) -> Option<~[u8]> {
125125
let mut dstlen: size_t = 0;
126126
snappy_uncompressed_length(psrc, srclen, &mut dstlen);
127127
128-
let mut dst = slice::with_capacity(dstlen as uint);
128+
let mut dst = vec::with_capacity(dstlen as uint);
129129
let pdst = dst.as_mut_ptr();
130130
131131
if snappy_uncompress(psrc, srclen, pdst, &mut dstlen) == 0 {

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,10 @@ might look like the example below.
255255

256256
~~~
257257
# use std::task::spawn;
258-
# use std::slice;
258+
# use std::vec;
259259
260260
// Create a vector of ports, one for each child task
261-
let rxs = slice::from_fn(3, |init_val| {
261+
let rxs = vec::from_fn(3, |init_val| {
262262
let (tx, rx) = channel();
263263
spawn(proc() {
264264
tx.send(some_expensive_computation(init_val));
@@ -304,7 +304,7 @@ be distributed on the available cores.
304304

305305
~~~
306306
# extern crate sync;
307-
# use std::slice;
307+
# use std::vec;
308308
fn partial_sum(start: uint) -> f64 {
309309
let mut local_sum = 0f64;
310310
for num in range(start*100000, (start+1)*100000) {
@@ -314,7 +314,7 @@ fn partial_sum(start: uint) -> f64 {
314314
}
315315
316316
fn main() {
317-
let mut futures = slice::from_fn(1000, |ind| sync::Future::spawn( proc() { partial_sum(ind) }));
317+
let mut futures = vec::from_fn(1000, |ind| sync::Future::spawn( proc() { partial_sum(ind) }));
318318
319319
let mut final_res = 0f64;
320320
for ft in futures.mut_iter() {
@@ -342,15 +342,15 @@ a single large vector of floats. Each task needs the full vector to perform its
342342
extern crate rand;
343343
extern crate sync;
344344
345-
use std::slice;
345+
use std::vec;
346346
use sync::Arc;
347347
348348
fn pnorm(nums: &~[f64], p: uint) -> f64 {
349349
nums.iter().fold(0.0, |a,b| a+(*b).powf(&(p as f64)) ).powf(&(1.0 / (p as f64)))
350350
}
351351
352352
fn main() {
353-
let numbers = slice::from_fn(1000000, |_| rand::random::<f64>());
353+
let numbers = vec::from_fn(1000000, |_| rand::random::<f64>());
354354
let numbers_arc = Arc::new(numbers);
355355
356356
for num in range(1u, 10) {
@@ -374,9 +374,9 @@ created by the line
374374
# extern crate sync;
375375
# extern crate rand;
376376
# use sync::Arc;
377-
# use std::slice;
377+
# use std::vec;
378378
# fn main() {
379-
# let numbers = slice::from_fn(1000000, |_| rand::random::<f64>());
379+
# let numbers = vec::from_fn(1000000, |_| rand::random::<f64>());
380380
let numbers_arc=Arc::new(numbers);
381381
# }
382382
~~~
@@ -387,9 +387,9 @@ and a clone of it is sent to each task
387387
# extern crate sync;
388388
# extern crate rand;
389389
# use sync::Arc;
390-
# use std::slice;
390+
# use std::vec;
391391
# fn main() {
392-
# let numbers=slice::from_fn(1000000, |_| rand::random::<f64>());
392+
# let numbers=vec::from_fn(1000000, |_| rand::random::<f64>());
393393
# let numbers_arc = Arc::new(numbers);
394394
# let (tx, rx) = channel();
395395
tx.send(numbers_arc.clone());
@@ -404,9 +404,9 @@ Each task recovers the underlying data by
404404
# extern crate sync;
405405
# extern crate rand;
406406
# use sync::Arc;
407-
# use std::slice;
407+
# use std::vec;
408408
# fn main() {
409-
# let numbers=slice::from_fn(1000000, |_| rand::random::<f64>());
409+
# let numbers=vec::from_fn(1000000, |_| rand::random::<f64>());
410410
# let numbers_arc=Arc::new(numbers);
411411
# let (tx, rx) = channel();
412412
# tx.send(numbers_arc.clone());

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,18 +188,18 @@ For example:
188188
# #[allow(unused_imports)];
189189
extern crate test;
190190
191-
use std::slice;
191+
use std::vec;
192192
use test::BenchHarness;
193193
194194
#[bench]
195195
fn bench_sum_1024_ints(b: &mut BenchHarness) {
196-
let v = slice::from_fn(1024, |n| n);
196+
let v = vec::from_fn(1024, |n| n);
197197
b.iter(|| {v.iter().fold(0, |old, new| old + *new);} );
198198
}
199199
200200
#[bench]
201201
fn initialise_a_vector(b: &mut BenchHarness) {
202-
b.iter(|| {slice::from_elem(1024, 0u64);} );
202+
b.iter(|| {vec::from_elem(1024, 0u64);} );
203203
b.bytes = 1024 * 8;
204204
}
205205

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,10 +595,10 @@ Other features provided by lang items include:
595595
- stack unwinding and general failure; the `eh_personality`, `fail_`
596596
and `fail_bounds_checks` lang items.
597597
- the traits in `std::kinds` used to indicate types that satisfy
598-
various kinds; lang items `send`, `share` and `pod`.
598+
various kinds; lang items `send`, `freeze` and `pod`.
599599
- the marker types and variance indicators found in
600600
`std::kinds::markers`; lang items `covariant_type`,
601-
`contravariant_lifetime`, `no_share_bound`, etc.
601+
`contravariant_lifetime`, `no_freeze_bound`, etc.
602602

603603
Lang items are loaded lazily by the compiler; e.g. if one never uses
604604
`~` then there is no need to define functions for `exchange_malloc`

branches/auto/src/doc/rust.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3136,12 +3136,8 @@ machine.
31363136

31373137
The types `char` and `str` hold textual data.
31383138

3139-
A value of type `char` is a [Unicode scalar value](
3140-
http://www.unicode.org/glossary/#unicode_scalar_value)
3141-
(ie. a code point that is not a surrogate),
3142-
represented as a 32-bit unsigned word in the 0x0000 to 0xD7FF
3143-
or 0xE000 to 0x10FFFF range.
3144-
A `[char]` vector is effectively an UCS-4 / UTF-32 string.
3139+
A value of type `char` is a Unicode character,
3140+
represented as a 32-bit unsigned word holding a UCS-4 codepoint.
31453141

31463142
A value of type `str` is a Unicode string,
31473143
represented as a vector of 8-bit unsigned bytes holding a sequence of UTF-8 codepoints.

branches/auto/src/doc/rustdoc.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub fn recalibrate() {
4343
Doc comments are markdown, and are currently parsed with the
4444
[sundown][sundown] library. rustdoc does not yet do any fanciness such as
4545
referencing other items inline, like javadoc's `@see`. One exception to this
46-
is that the first paragraph will be used as the "summary" of an item in the
46+
is that the first paragrah will be used as the "summary" of an item in the
4747
generated documentation:
4848

4949
~~~
@@ -79,11 +79,11 @@ rustdoc can also generate JSON, for consumption by other tools, with
7979

8080
# Using the Documentation
8181

82-
The web pages generated by rustdoc present the same logical hierarchy that one
82+
The web pages generated by rustdoc present the same logical heirarchy that one
8383
writes a library with. Every kind of item (function, struct, etc) has its own
8484
color, and one can always click on a colored type to jump to its
8585
documentation. There is a search bar at the top, which is powered by some
86-
JavaScript and a statically-generated search index. No special web server is
86+
javascript and a statically-generated search index. No special web server is
8787
required for the search.
8888

8989
[sundown]: https://github.com/vmg/sundown/
@@ -108,7 +108,7 @@ code, the `ignore` string can be added to the three-backtick form of markdown
108108
code block.
109109

110110
/**
111-
# nested code fences confuse sundown => indentation + comment to
111+
# nested codefences confuse sundown => indentation + comment to
112112
# avoid failing tests
113113
```
114114
// This is a testable code block
@@ -126,7 +126,7 @@ You can specify that the test's execution should fail with the `should_fail`
126126
directive.
127127

128128
/**
129-
# nested code fences confuse sundown => indentation + comment to
129+
# nested codefences confuse sundown => indentation + comment to
130130
# avoid failing tests
131131
```should_fail
132132
// This code block is expected to generate a failure when run
@@ -138,7 +138,7 @@ You can specify that the code block should be compiled but not run with the
138138
`no_run` directive.
139139

140140
/**
141-
# nested code fences confuse sundown => indentation + comment to
141+
# nested codefences confuse sundown => indentation + comment to
142142
# avoid failing tests
143143
```no_run
144144
// This code will be compiled but not executed
@@ -153,7 +153,7 @@ testing the code block (NB. the space after the `#` is required, so
153153
that one can still write things like `#[deriving(Eq)]`).
154154

155155
/**
156-
# nested code fences confuse sundown => indentation + comment to
156+
# nested codefences confuse sundown => indentation + comment to
157157
# avoid failing tests
158158
```rust
159159
# /!\ The three following lines are comments, which are usually stripped off by
@@ -162,7 +162,7 @@ that one can still write things like `#[deriving(Eq)]`).
162162
# these first five lines but a non breakable one.
163163
#
164164
# // showing 'fib' in this documentation would just be tedious and detracts from
165-
# // what's actually being documented.
165+
# // what's actualy being documented.
166166
# fn fib(n: int) { n + 2 }
167167

168168
do spawn { fib(200); }
@@ -190,7 +190,7 @@ $ rustdoc --test lib.rs --test-args '--help'
190190
~~~
191191

192192
When testing a library, code examples will often show how functions are used,
193-
and this code often requires `use`-ing paths from the crate. To accommodate this,
193+
and this code often requires `use`-ing paths from the crate. To accomodate this,
194194
rustdoc will implicitly add `extern crate <crate>;` where `<crate>` is the name of
195195
the crate being tested to the top of each code example. This means that rustdoc
196196
must be able to find a compiled version of the library crate being tested. Extra

branches/auto/src/doc/tutorial.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2095,10 +2095,6 @@ and may not be overridden:
20952095
Types are sendable
20962096
unless they contain managed boxes, managed closures, or references.
20972097
2098-
* `Share` - Types that are *threadsafe*
2099-
These are types that are safe to be used across several threads with access to
2100-
a `&T` pointer. `MutexArc` is an example of a *sharable* type with internal mutable data.
2101-
21022098
* `Freeze` - Constant (immutable) types.
21032099
These are types that do not contain anything intrinsically mutable.
21042100
Intrinsically mutable values include `Cell` in the standard library.

branches/auto/src/etc/unicode.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def emit_bsearch_range_table(f):
162162
f.write("""
163163
fn bsearch_range_table(c: char, r: &'static [(char,char)]) -> bool {
164164
use cmp::{Equal, Less, Greater};
165-
use slice::ImmutableVector;
165+
use vec::ImmutableVector;
166166
use option::None;
167167
r.bsearch(|&(lo,hi)| {
168168
if lo <= c && c <= hi { Equal }
@@ -200,7 +200,7 @@ def emit_conversions_module(f, lowerupper, upperlower):
200200
f.write("pub mod conversions {\n")
201201
f.write("""
202202
use cmp::{Equal, Less, Greater};
203-
use slice::ImmutableVector;
203+
use vec::ImmutableVector;
204204
use tuple::Tuple2;
205205
use option::{Option, Some, None};
206206
@@ -264,7 +264,7 @@ def emit_decomp_module(f, canon, compat, combine):
264264
f.write("pub mod decompose {\n");
265265
f.write(" use option::Option;\n");
266266
f.write(" use option::{Some, None};\n");
267-
f.write(" use slice::ImmutableVector;\n");
267+
f.write(" use vec::ImmutableVector;\n");
268268
f.write("""
269269
fn bsearch_table(c: char, r: &'static [(char, &'static [char])]) -> Option<&'static [char]> {
270270
use cmp::{Equal, Less, Greater};

branches/auto/src/libarena/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ use std::rc::Rc;
4242
use std::rt::global_heap;
4343
use std::intrinsics::{TyDesc, get_tydesc};
4444
use std::intrinsics;
45-
use std::slice;
45+
use std::vec;
4646

4747
// The way arena uses arrays is really deeply awful. The arrays are
4848
// allocated, and have capacities reserved, but the fill for the array
@@ -111,7 +111,7 @@ impl Arena {
111111

112112
fn chunk(size: uint, is_pod: bool) -> Chunk {
113113
Chunk {
114-
data: Rc::new(RefCell::new(slice::with_capacity(size))),
114+
data: Rc::new(RefCell::new(vec::with_capacity(size))),
115115
fill: Cell::new(0u),
116116
is_pod: Cell::new(is_pod),
117117
}

0 commit comments

Comments
 (0)