Skip to content

Commit 5f1f57c

Browse files
committed
---
yaml --- r: 106988 b: refs/heads/try c: 0de6441 h: refs/heads/master v: v3
1 parent dedf2d6 commit 5f1f57c

File tree

339 files changed

+6720
-8416
lines changed

Some content is hidden

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

339 files changed

+6720
-8416
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: b8ef9fd9c9f642ce7b8aed82782a1ed745d08d64
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: b8601a3d8b91ad3b653d143307611f2f5c75617e
5-
refs/heads/try: 7334c11b4b196e39da2418a239e2ff916896fa19
5+
refs/heads/try: 0de6441aa928446e9e9c4c9a903dcb66a3145c1a
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/compiletest/compiletest.rs

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

1414
#[allow(non_camel_case_types)];
1515
#[deny(warnings)];
16+
#[allow(deprecated_owned_vector)];
1617

1718
extern crate test;
1819
extern crate getopts;

branches/try/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/try/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/try/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/try/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/try/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/try/src/doc/rust.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2033,7 +2033,7 @@ Supported traits for `deriving` are:
20332033

20342034
* Comparison traits: `Eq`, `TotalEq`, `Ord`, `TotalOrd`.
20352035
* Serialization: `Encodable`, `Decodable`. These require `serialize`.
2036-
* `Clone` and `DeepClone`, to perform (deep) copies.
2036+
* `Clone`, to create `T` from `&T` via a copy.
20372037
* `Hash`, to iterate over the bytes in a data type.
20382038
* `Rand`, to create a random instance of a data type.
20392039
* `Default`, to create an empty instance of a data type.
@@ -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/try/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/try/src/doc/tutorial.md

Lines changed: 1 addition & 5 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.
@@ -2538,7 +2534,7 @@ enum ABC { A, B, C }
25382534
~~~
25392535

25402536
The full list of derivable traits is `Eq`, `TotalEq`, `Ord`,
2541-
`TotalOrd`, `Encodable` `Decodable`, `Clone`, `DeepClone`,
2537+
`TotalOrd`, `Encodable` `Decodable`, `Clone`,
25422538
`Hash`, `Rand`, `Default`, `Zero`, `FromPrimitive` and `Show`.
25432539

25442540
# Crates and the module system

branches/try/src/etc/generate-deriving-span-tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def write_file(name, string):
116116
}
117117

118118
for (trait, supers, errs) in [('Rand', [], 1),
119-
('Clone', [], 1), ('DeepClone', ['Clone'], 1),
119+
('Clone', [], 1),
120120
('Eq', [], 2), ('Ord', [], 8),
121121
('TotalEq', [], 1), ('TotalOrd', ['TotalEq'], 1),
122122
('Show', [], 1),

branches/try/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/try/src/etc/vim/syntax/rust.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ syn keyword rustTrait Any AnyOwnExt AnyRefExt AnyMutRefExt
7272
syn keyword rustTrait Ascii AsciiCast OwnedAsciiCast AsciiStr IntoBytes
7373
syn keyword rustTrait ToCStr
7474
syn keyword rustTrait Char
75-
syn keyword rustTrait Clone DeepClone
75+
syn keyword rustTrait Clone
7676
syn keyword rustTrait Eq Ord TotalEq TotalOrd Ordering Equiv
7777
syn keyword rustEnumVariant Less Equal Greater
7878
syn keyword rustTrait Container Mutable Map MutableMap Set MutableSet

branches/try/src/libarena/lib.rs

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

2829
extern crate collections;
2930

@@ -41,7 +42,7 @@ use std::rc::Rc;
4142
use std::rt::global_heap;
4243
use std::intrinsics::{TyDesc, get_tydesc};
4344
use std::intrinsics;
44-
use std::slice;
45+
use std::vec;
4546

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

111112
fn chunk(size: uint, is_pod: bool) -> Chunk {
112113
Chunk {
113-
data: Rc::new(RefCell::new(slice::with_capacity(size))),
114+
data: Rc::new(RefCell::new(vec::with_capacity(size))),
114115
fill: Cell::new(0u),
115116
is_pod: Cell::new(is_pod),
116117
}

0 commit comments

Comments
 (0)