Skip to content

Commit e010603

Browse files
committed
---
yaml --- r: 104991 b: refs/heads/snap-stage3 c: 6eae7df h: refs/heads/master i: 104989: 57659b5 104987: a956ca9 104983: c2fbbe8 104975: 669aa29 104959: e1f0ef3 v: v3
1 parent 6a87df9 commit e010603

File tree

337 files changed

+8419
-6723
lines changed

Some content is hidden

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

337 files changed

+8419
-6723
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 62f1d68439dcfd509eaca29887afa97f22938373
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 0de6441aa928446e9e9c4c9a903dcb66a3145c1a
4+
refs/heads/snap-stage3: 6eae7df43cd21b76fe91eeaf6ef2af9bd2a8fafc
55
refs/heads/try: db814977d07bd798feb24f6b74c00800ef458a13
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/compiletest/compiletest.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
#[allow(non_camel_case_types)];
1515
#[deny(warnings)];
16-
#[allow(deprecated_owned_vector)];
1716

1817
extern crate test;
1918
extern crate getopts;

branches/snap-stage3/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::vec;
35+
use std::slice;
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 = vec::from_elem(
503+
let mut found_flags = slice::from_elem(
504504
expected_errors.len(), false);
505505

506506
if proc_res.status.success() {

branches/snap-stage3/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 `vec::raw` module to manipulate Rust
74+
Wrapping the functions which expect buffers involves using the `slice::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 = vec::with_capacity(dstlen as uint);
106+
let mut dst = slice::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 = vec::with_capacity(dstlen as uint);
128+
let mut dst = slice::with_capacity(dstlen as uint);
129129
let pdst = dst.as_mut_ptr();
130130
131131
if snappy_uncompress(psrc, srclen, pdst, &mut dstlen) == 0 {

branches/snap-stage3/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::vec;
258+
# use std::slice;
259259
260260
// Create a vector of ports, one for each child task
261-
let rxs = vec::from_fn(3, |init_val| {
261+
let rxs = slice::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::vec;
307+
# use std::slice;
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 = vec::from_fn(1000, |ind| sync::Future::spawn( proc() { partial_sum(ind) }));
317+
let mut futures = slice::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::vec;
345+
use std::slice;
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 = vec::from_fn(1000000, |_| rand::random::<f64>());
353+
let numbers = slice::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::vec;
377+
# use std::slice;
378378
# fn main() {
379-
# let numbers = vec::from_fn(1000000, |_| rand::random::<f64>());
379+
# let numbers = slice::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::vec;
390+
# use std::slice;
391391
# fn main() {
392-
# let numbers=vec::from_fn(1000000, |_| rand::random::<f64>());
392+
# let numbers=slice::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::vec;
407+
# use std::slice;
408408
# fn main() {
409-
# let numbers=vec::from_fn(1000000, |_| rand::random::<f64>());
409+
# let numbers=slice::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/snap-stage3/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::vec;
191+
use std::slice;
192192
use test::BenchHarness;
193193
194194
#[bench]
195195
fn bench_sum_1024_ints(b: &mut BenchHarness) {
196-
let v = vec::from_fn(1024, |n| n);
196+
let v = slice::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(|| {vec::from_elem(1024, 0u64);} );
202+
b.iter(|| {slice::from_elem(1024, 0u64);} );
203203
b.bytes = 1024 * 8;
204204
}
205205

branches/snap-stage3/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`, `freeze` and `pod`.
598+
various kinds; lang items `send`, `share` and `pod`.
599599
- the marker types and variance indicators found in
600600
`std::kinds::markers`; lang items `covariant_type`,
601-
`contravariant_lifetime`, `no_freeze_bound`, etc.
601+
`contravariant_lifetime`, `no_share_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/snap-stage3/src/doc/rust.md

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

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

3139-
A value of type `char` is a Unicode character,
3140-
represented as a 32-bit unsigned word holding a UCS-4 codepoint.
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.
31413145

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

branches/snap-stage3/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 paragrah will be used as the "summary" of an item in the
46+
is that the first paragraph 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 heirarchy that one
82+
The web pages generated by rustdoc present the same logical hierarchy 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 codefences confuse sundown => indentation + comment to
111+
# nested code fences 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 codefences confuse sundown => indentation + comment to
129+
# nested code fences 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 codefences confuse sundown => indentation + comment to
141+
# nested code fences 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 codefences confuse sundown => indentation + comment to
156+
# nested code fences 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 actualy being documented.
165+
# // what's actually 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 accomodate this,
193+
and this code often requires `use`-ing paths from the crate. To accommodate 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/snap-stage3/src/doc/tutorial.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2095,6 +2095,10 @@ 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+
20982102
* `Freeze` - Constant (immutable) types.
20992103
These are types that do not contain anything intrinsically mutable.
21002104
Intrinsically mutable values include `Cell` in the standard library.

branches/snap-stage3/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 vec::ImmutableVector;
165+
use slice::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 vec::ImmutableVector;
203+
use slice::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 vec::ImmutableVector;\n");
267+
f.write(" use slice::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/snap-stage3/src/libarena/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
html_root_url = "http://static.rust-lang.org/doc/master")];
2525
#[allow(missing_doc)];
2626
#[feature(managed_boxes)];
27-
#[allow(deprecated_owned_vector)];
2827

2928
extern crate collections;
3029

@@ -42,7 +41,7 @@ use std::rc::Rc;
4241
use std::rt::global_heap;
4342
use std::intrinsics::{TyDesc, get_tydesc};
4443
use std::intrinsics;
45-
use std::vec;
44+
use std::slice;
4645

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

112111
fn chunk(size: uint, is_pod: bool) -> Chunk {
113112
Chunk {
114-
data: Rc::new(RefCell::new(vec::with_capacity(size))),
113+
data: Rc::new(RefCell::new(slice::with_capacity(size))),
115114
fill: Cell::new(0u),
116115
is_pod: Cell::new(is_pod),
117116
}

0 commit comments

Comments
 (0)