Skip to content

Commit 252ff9a

Browse files
committed
---
yaml --- r: 152253 b: refs/heads/try2 c: aa09561 h: refs/heads/master i: 152251: 62798fb v: v3
1 parent 1a9f455 commit 252ff9a

File tree

194 files changed

+3421
-3164
lines changed

Some content is hidden

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

194 files changed

+3421
-3164
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 96cc48fba28a32f0dd46b0fe38e04e6aff74456f
8+
refs/heads/try2: aa09561bb606bb622136ac9ad3702ab1179db5b2
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/crates.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
TARGET_CRATES := libc std green rustuv native flate arena glob term semver \
5353
uuid serialize sync getopts collections num test time rand \
54-
workcache url log regex graphviz core rlibc alloc debug
54+
url log regex graphviz core rlibc alloc debug
5555
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros
5656
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5757
TOOLS := compiletest rustdoc rustc
@@ -88,7 +88,6 @@ DEPS_test := std collections getopts serialize term time regex
8888
DEPS_time := std serialize sync
8989
DEPS_rand := core
9090
DEPS_url := std collections
91-
DEPS_workcache := std serialize collections log
9291
DEPS_log := std sync
9392
DEPS_regex := std collections
9493
DEPS_regex_macros = syntax std regex

branches/try2/src/README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,37 @@ Source layout:
55
| Path | Description |
66
| ------------------- | --------------------------------------------------------- |
77
| `librustc/` | The self-hosted compiler |
8+
| `liballoc/` | Rust's core allocation library |
9+
| `libcore/` | The Rust core library |
10+
| `libdebug/` | Debugging utilities |
811
| `libstd/` | The standard library (imported and linked by default) |
9-
| `libextra/` | The "extras" library (slightly more peripheral code) |
1012
| `libgreen/` | The M:N runtime library |
1113
| `libnative/` | The 1:1 runtime library |
1214
| `libsyntax/` | The Rust parser and pretty-printer |
13-
| `libcollections/` | A collection of useful data structures and containers |
14-
| `libnum/` | Extended number support library (complex, rational, etc) |
1515
| `libtest/` | Rust's test-runner code |
1616
| ------------------- | --------------------------------------------------------- |
1717
| `libarena/` | The arena (a fast but limited) memory allocator |
18+
| `libbacktrace/` | The libbacktrace library |
19+
| `libcollections/` | A collection of useful data structures and containers |
1820
| `libflate/` | Simple compression library |
21+
| `libfmt_macros/` | Macro support for format strings |
1922
| `libfourcc/` | Data format identifier library |
2023
| `libgetopts/` | Get command-line-options library |
2124
| `libglob/` | Unix glob patterns library |
25+
| `libgraphviz/` | Generating files for Graphviz |
26+
| `libhexfloat/` | Hexadecimal floating-point literals |
27+
| `liblibc/` | Bindings for the C standard library |
28+
| `liblog/` | Utilities for program-wide and customizable logging |
29+
| `libnum/` | Extended number support library (complex, rational, etc) |
30+
| `librand/` | Random numbers and distributions |
2231
| `libregex/` | Regular expressions |
32+
| `libregex_macros/` | The regex! syntax extension |
2333
| `libsemver/` | Rust's semantic versioning library |
2434
| `libserialize/` | Encode-Decode types library |
2535
| `libsync/` | Concurrency mechanisms and primitives |
2636
| `libterm/` | ANSI color library for terminals |
2737
| `libtime/` | Time operations library |
38+
| `liburl/` | URL handling lirary |
2839
| `libuuid/` | UUID's handling code |
2940
| ------------------- | --------------------------------------------------------- |
3041
| `rt/` | The runtime system |

branches/try2/src/doc/complement-cheatsheet.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
**Int to string**
66

7-
Use [`ToStr`](../std/to_str/trait.ToStr.html).
7+
Use [`ToStr`](std/to_str/trait.ToStr.html).
88

99
~~~
1010
let x: int = 42;
@@ -13,8 +13,8 @@ let y: String = x.to_str().to_string();
1313

1414
**String to int**
1515

16-
Use [`FromStr`](../std/from_str/trait.FromStr.html), and its helper function,
17-
[`from_str`](../std/from_str/fn.from_str.html).
16+
Use [`FromStr`](std/from_str/trait.FromStr.html), and its helper function,
17+
[`from_str`](std/from_str/fn.from_str.html).
1818

1919
~~~
2020
let x: Option<int> = from_str("42");
@@ -35,8 +35,8 @@ let y: String = format!("{:X}", x); // uppercase hexadecimal
3535

3636
**String to int, in non-base-10**
3737

38-
Use [`FromStrRadix`](../std/num/trait.FromStrRadix.html), and its helper
39-
function, [`from_str_radix`](../std/num/fn.from_str_radix.html).
38+
Use [`FromStrRadix`](std/num/trait.FromStrRadix.html), and its helper
39+
function, [`from_str_radix`](std/num/fn.from_str_radix.html).
4040

4141
~~~
4242
use std::num;
@@ -48,7 +48,7 @@ let y: i64 = x.unwrap();
4848
**Vector of Bytes to String**
4949

5050
To return a Borrowed String Slice (&str) use the str helper function
51-
[`from_utf8`](../std/str/fn.from_utf8.html).
51+
[`from_utf8`](std/str/fn.from_utf8.html).
5252

5353
~~~
5454
use std::str;
@@ -58,7 +58,7 @@ let x: &str = str::from_utf8(bytes).unwrap();
5858
~~~
5959

6060
To return an Owned String use the str helper function
61-
[`from_utf8_owned`](../std/str/fn.from_utf8_owned.html).
61+
[`from_utf8_owned`](std/str/fn.from_utf8_owned.html).
6262

6363
~~~
6464
use std::str;
@@ -68,8 +68,8 @@ let x: Option<String> =
6868
let y: String = x.unwrap();
6969
~~~
7070

71-
To return a [`MaybeOwned`](../std/str/enum.MaybeOwned.html) use the str helper
72-
function [`from_utf8_lossy`](../std/str/fn.from_utf8_owned.html).
71+
To return a [`MaybeOwned`](std/str/type.MaybeOwned.html) use the str helper
72+
function [`from_utf8_lossy`](std/str/fn.from_utf8_owned.html).
7373
This function also replaces non-valid utf-8 sequences with U+FFFD replacement
7474
character.
7575

@@ -103,11 +103,11 @@ contained data as a `&mut [T]`.
103103
## How do I read from a file?
104104

105105
Use
106-
[`File::open`](../std/io/fs/struct.File.html#method.open)
106+
[`File::open`](std/io/fs/struct.File.html#method.open)
107107
to create a
108-
[`File`](../std/io/fs/struct.File.html)
108+
[`File`](std/io/fs/struct.File.html)
109109
struct, which implements the
110-
[`Reader`](../std/io/trait.Reader.html)
110+
[`Reader`](std/io/trait.Reader.html)
111111
trait.
112112

113113
~~~ {.ignore}
@@ -121,7 +121,8 @@ let reader : File = File::open(&path).unwrap_or_else(on_error);
121121

122122
## How do I iterate over the lines in a file?
123123

124-
Use the [`lines`](../std/io/trait.Buffer.html#method.lines) method on a [`BufferedReader`](../std/io/buffered/struct.BufferedReader.html).
124+
Use the [`lines`](std/io/trait.Buffer.html#method.lines) method on a
125+
[`BufferedReader`](std/io/struct.BufferedReader.html).
125126

126127
~~~
127128
use std::io::BufferedReader;
@@ -139,7 +140,7 @@ for line in reader.lines() {
139140

140141
## How do I search for a substring?
141142

142-
Use the [`find_str`](../std/str/trait.StrSlice.html#tymethod.find_str) method.
143+
Use the [`find_str`](std/str/trait.StrSlice.html#tymethod.find_str) method.
143144

144145
~~~
145146
let str = "Hello, this is some random string";
@@ -150,7 +151,7 @@ let index: Option<uint> = str.find_str("rand");
150151

151152
## How do I get the length of a vector?
152153

153-
The [`Container`](../std/container/trait.Container.html) trait provides the `len` method.
154+
The [`Container`](std/container/trait.Container.html) trait provides the `len` method.
154155

155156
~~~
156157
let u: Vec<u32> = vec![0, 1, 2];
@@ -162,7 +163,7 @@ println!("u: {}, v: {}, w: {}", u.len(), v.len(), w.len()); // 3, 4, 5
162163

163164
## How do I iterate over a vector?
164165

165-
Use the [`iter`](../std/vec/trait.ImmutableVector.html#tymethod.iter) method.
166+
Use the [`iter`](std/slice/trait.ImmutableVector.html#tymethod.iter) method.
166167

167168
~~~
168169
let values: Vec<int> = vec![1, 2, 3, 4, 5];
@@ -171,9 +172,9 @@ for value in values.iter() { // value: &int
171172
}
172173
~~~
173174

174-
(See also [`mut_iter`](../std/vec/trait.MutableVector.html#tymethod.mut_iter)
175+
(See also [`mut_iter`](std/slice/trait.MutableVector.html#tymethod.mut_iter)
175176
which yields `&mut int` and
176-
[`move_iter`](../std/vec/trait.OwnedVector.html#tymethod.move_iter) which yields
177+
[`move_iter`](std/slice/trait.OwnedVector.html#tymethod.move_iter) which yields
177178
`int` while consuming the `values` vector.)
178179

179180
# Type system
@@ -254,7 +255,7 @@ Note: The Rust signatures should be wrapped in an `extern "ABI" { ... }` block.
254255

255256
You might see things like this in C APIs:
256257

257-
~~~ {.notrust}
258+
~~~c
258259
typedef struct Window Window;
259260
Window* createWindow(int width, int height);
260261
~~~

branches/try2/src/doc/complement-lang-faq.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Some examples that demonstrate different aspects of the language:
2121
* The extra library's [json] module. Enums and pattern matching
2222

2323
[sprocketnes]: https://github.com/pcwalton/sprocketnes
24-
[hash]: https://github.com/mozilla/rust/blob/master/src/libstd/hash.rs
24+
[hash]: https://github.com/mozilla/rust/blob/master/src/libstd/hash/mod.rs
2525
[HashMap]: https://github.com/mozilla/rust/blob/master/src/libcollections/hashmap.rs
2626
[json]: https://github.com/mozilla/rust/blob/master/src/libserialize/json.rs
2727

@@ -135,7 +135,7 @@ For simplicity, we do not plan to do so. Implementing automatic semicolon insert
135135

136136
**Short answer** set the RUST_LOG environment variable to the name of your source file, sans extension.
137137

138-
```notrust,sh
138+
```sh
139139
rustc hello.rs
140140
export RUST_LOG=hello
141141
./hello
@@ -149,6 +149,6 @@ example we were setting RUST_LOG to the name of the hello crate. Multiple paths
149149
can be combined to control the exact logging you want to see. For example, when
150150
debugging linking in the compiler you might set
151151
`RUST_LOG=rustc::metadata::creader,rustc::util::filesearch,rustc::back::rpath`
152-
For a full description see [the language reference][1].
152+
For a full description see [the logging crate][1].
153153

154-
[1]:http://doc.rust-lang.org/doc/master/rust.html#logging-system
154+
[1]:log/index.html

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ fn main() {
229229

230230
C code:
231231

232-
~~~~ {.notrust}
232+
~~~~c
233233
typedef void (*rust_callback)(int32_t);
234234
rust_callback cb;
235235

@@ -296,7 +296,7 @@ fn main() {
296296

297297
C code:
298298

299-
~~~~ {.notrust}
299+
~~~~c
300300
typedef void (*rust_callback)(int32_t);
301301
void* cb_target;
302302
rust_callback cb;

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Now we can call `compute_distance()`:
6767
# let on_the_stack : Point = Point{x: 3.0, y: 4.0};
6868
# let on_the_heap : Box<Point> = box Point{x: 7.0, y: 9.0};
6969
# fn compute_distance(p1: &Point, p2: &Point) -> f64 { 0.0 }
70-
compute_distance(&on_the_stack, &*on_the_heap);
70+
compute_distance(&on_the_stack, on_the_heap);
7171
~~~
7272

7373
Here, the `&` operator takes the address of the variable
@@ -77,9 +77,10 @@ value. We also call this _borrowing_ the local variable
7777
`on_the_stack`, because we have created an alias: that is, another
7878
name for the same data.
7979

80-
For the second argument, we need to extract the contents of `on_the_heap`
81-
by derefercing with the `*` symbol. Now that we have the data, we need
82-
to create a reference with the `&` symbol.
80+
In the case of `on_the_heap`, however, no explicit action is necessary.
81+
The compiler will automatically convert a box box point to a reference like &point.
82+
This is another form of borrowing; in this case, the contents of the owned box
83+
are being lent out.
8384

8485
Whenever a caller lends data to a callee, there are some limitations on what
8586
the caller can do with the original. For example, if the contents of a
@@ -217,7 +218,7 @@ fn example3() -> int {
217218
To make this clearer, consider this diagram showing the state of
218219
memory immediately before the re-assignment of `x`:
219220

220-
~~~ {.notrust}
221+
~~~ {.text}
221222
Stack Exchange Heap
222223
223224
x +-------------+
@@ -231,7 +232,7 @@ memory immediately before the re-assignment of `x`:
231232

232233
Once the reassignment occurs, the memory will look like this:
233234

234-
~~~ {.notrust}
235+
~~~ {.text}
235236
Stack Exchange Heap
236237
237238
x +-------------+ +---------+
@@ -328,7 +329,7 @@ to a pointer of type `&size` into the _interior of the enum_.
328329
To make this more clear, let's look at a diagram of memory layout in
329330
the case where `shape` points at a rectangle:
330331

331-
~~~ {.notrust}
332+
~~~ {.text}
332333
Stack Memory
333334
334335
+-------+ +---------------+
@@ -353,7 +354,7 @@ to store that shape value would still be valid, _it would have a
353354
different type_! The following diagram shows what memory would look
354355
like if code overwrote `shape` with a circle:
355356

356-
~~~ {.notrust}
357+
~~~ {.text}
357358
Stack Memory
358359
359360
+-------+ +---------------+

branches/try2/src/doc/guide-pointers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn main() {
3131

3232
And now I get an error:
3333

34-
~~~ {.notrust}
34+
~~~text
3535
error: mismatched types: expected `&int` but found `<generic integer #0>` (expected &-ptr but found integral variable)
3636
~~~
3737

@@ -201,7 +201,7 @@ fn main() {
201201

202202
This prints:
203203

204-
~~~ {.notrust}
204+
~~~text
205205
Cons(1, box Cons(2, box Cons(3, box Nil)))
206206
~~~
207207

@@ -347,7 +347,7 @@ fn main() {
347347

348348
It gives this error:
349349

350-
~~~ {.notrust}
350+
~~~text
351351
test.rs:5:8: 5:10 error: cannot assign to `*x` because it is borrowed
352352
test.rs:5 *x -= 1;
353353
^~

0 commit comments

Comments
 (0)