Skip to content

Commit dd9f776

Browse files
committed
---
yaml --- r: 118189 b: refs/heads/try c: 896cfcc h: refs/heads/master i: 118187: 50004b4 v: v3
1 parent 103cc2b commit dd9f776

Some content is hidden

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

86 files changed

+1822
-2270
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: 3770c42a4959cbabc73da52abc7e3db96657974e
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: d6736a1440d42f6af967a8a20ab8d73522112b72
5-
refs/heads/try: 193574ae1e3881f95afb8b3e385a9e410ac6798a
5+
refs/heads/try: 896cfcc67fb8d3e53a5dcf138f79909891bf940e
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/mk/crates.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
101101
TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
102102

103103
ONLY_RLIB_core := 1
104-
ONLY_RLIB_libc := 1
105104
ONLY_RLIB_rlibc := 1
106105
ONLY_RLIB_alloc := 1
107106
ONLY_RLIB_rand := 1

branches/try/src/README.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,26 @@ 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 |
118
| `libstd/` | The standard library (imported and linked by default) |
9+
| `libextra/` | The "extras" library (slightly more peripheral code) |
1210
| `libgreen/` | The M:N runtime library |
1311
| `libnative/` | The 1:1 runtime library |
1412
| `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 |
2018
| `libflate/` | Simple compression library |
21-
| `libfmt_macros/` | Macro support for format strings |
2219
| `libfourcc/` | Data format identifier library |
2320
| `libgetopts/` | Get command-line-options library |
2421
| `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 |
3122
| `libregex/` | Regular expressions |
32-
| `libregex_macros/` | The regex! syntax extension |
3323
| `libsemver/` | Rust's semantic versioning library |
3424
| `libserialize/` | Encode-Decode types library |
3525
| `libsync/` | Concurrency mechanisms and primitives |
3626
| `libterm/` | ANSI color library for terminals |
3727
| `libtime/` | Time operations library |
38-
| `liburl/` | URL handling lirary |
3928
| `libuuid/` | UUID's handling code |
4029
| ------------------- | --------------------------------------------------------- |
4130
| `rt/` | The runtime system |

branches/try/src/compiletest/runtest.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
361361
],
362362
vec!(("".to_string(), "".to_string())),
363363
Some("".to_string()))
364-
.expect(format!("failed to exec `{}`", config.adb_path));
364+
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
365365

366366
procsrv::run("",
367367
config.adb_path.as_slice(),
@@ -372,7 +372,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
372372
],
373373
vec!(("".to_string(), "".to_string())),
374374
Some("".to_string()))
375-
.expect(format!("failed to exec `{}`", config.adb_path));
375+
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
376376

377377
let adb_arg = format!("export LD_LIBRARY_PATH={}; \
378378
gdbserver :5039 {}/{}",
@@ -392,7 +392,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
392392
vec!(("".to_string(),
393393
"".to_string())),
394394
Some("".to_string()))
395-
.expect(format!("failed to exec `{}`", config.adb_path));
395+
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
396396
loop {
397397
//waiting 1 second for gdbserver start
398398
timer::sleep(1000);
@@ -428,7 +428,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
428428
debugger_opts.as_slice(),
429429
vec!(("".to_string(), "".to_string())),
430430
None)
431-
.expect(format!("failed to exec `{}`", gdb_path));
431+
.expect(format!("failed to exec `{}`", gdb_path).as_slice());
432432
let cmdline = {
433433
let cmdline = make_cmdline("",
434434
"arm-linux-androideabi-gdb",
@@ -1207,7 +1207,7 @@ fn program_output(config: &Config, testfile: &Path, lib_path: &str, prog: String
12071207
prog.as_slice(),
12081208
args.as_slice(),
12091209
env,
1210-
input).expect(format!("failed to exec `{}`", prog));
1210+
input).expect(format!("failed to exec `{}`", prog).as_slice());
12111211
dump_output(config, testfile, out.as_slice(), err.as_slice());
12121212
return ProcRes {
12131213
status: status,
@@ -1333,7 +1333,7 @@ fn _arm_exec_compiled_test(config: &Config,
13331333
],
13341334
vec!(("".to_string(), "".to_string())),
13351335
Some("".to_string()))
1336-
.expect(format!("failed to exec `{}`", config.adb_path));
1336+
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
13371337

13381338
if config.verbose {
13391339
println!("push ({}) {} {} {}",
@@ -1363,7 +1363,7 @@ fn _arm_exec_compiled_test(config: &Config,
13631363
config.adb_path.as_slice(),
13641364
runargs.as_slice(),
13651365
vec!(("".to_string(), "".to_string())), Some("".to_string()))
1366-
.expect(format!("failed to exec `{}`", config.adb_path));
1366+
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
13671367

13681368
// get exitcode of result
13691369
runargs = Vec::new();
@@ -1377,7 +1377,7 @@ fn _arm_exec_compiled_test(config: &Config,
13771377
runargs.as_slice(),
13781378
vec!(("".to_string(), "".to_string())),
13791379
Some("".to_string()))
1380-
.expect(format!("failed to exec `{}`", config.adb_path));
1380+
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
13811381

13821382
let mut exitcode: int = 0;
13831383
for c in exitcode_out.as_slice().chars() {
@@ -1400,7 +1400,7 @@ fn _arm_exec_compiled_test(config: &Config,
14001400
runargs.as_slice(),
14011401
vec!(("".to_string(), "".to_string())),
14021402
Some("".to_string()))
1403-
.expect(format!("failed to exec `{}`", config.adb_path));
1403+
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
14041404

14051405
// get stderr of result
14061406
runargs = Vec::new();
@@ -1414,7 +1414,7 @@ fn _arm_exec_compiled_test(config: &Config,
14141414
runargs.as_slice(),
14151415
vec!(("".to_string(), "".to_string())),
14161416
Some("".to_string()))
1417-
.expect(format!("failed to exec `{}`", config.adb_path));
1417+
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
14181418

14191419
dump_output(config,
14201420
testfile,
@@ -1448,7 +1448,7 @@ fn _arm_push_aux_shared_library(config: &Config, testfile: &Path) {
14481448
vec!(("".to_string(),
14491449
"".to_string())),
14501450
Some("".to_string()))
1451-
.expect(format!("failed to exec `{}`", config.adb_path));
1451+
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
14521452

14531453
if config.verbose {
14541454
println!("push ({}) {} {} {}",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ Note: The Rust signatures should be wrapped in an `extern "ABI" { ... }` block.
255255

256256
You might see things like this in C APIs:
257257

258-
~~~c
258+
~~~ {.notrust}
259259
typedef struct Window Window;
260260
Window* createWindow(int width, int height);
261261
~~~

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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-
```sh
138+
```notrust,sh
139139
rustc hello.rs
140140
export RUST_LOG=hello
141141
./hello

branches/try/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-
~~~~c
232+
~~~~ {.notrust}
233233
typedef void (*rust_callback)(int32_t);
234234
rust_callback cb;
235235
@@ -296,7 +296,7 @@ fn main() {
296296

297297
C code:
298298

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

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ fn example3() -> int {
218218
To make this clearer, consider this diagram showing the state of
219219
memory immediately before the re-assignment of `x`:
220220

221-
~~~ {.text}
221+
~~~ {.notrust}
222222
Stack Exchange Heap
223223
224224
x +-------------+
@@ -232,7 +232,7 @@ memory immediately before the re-assignment of `x`:
232232

233233
Once the reassignment occurs, the memory will look like this:
234234

235-
~~~ {.text}
235+
~~~ {.notrust}
236236
Stack Exchange Heap
237237
238238
x +-------------+ +---------+
@@ -329,7 +329,7 @@ to a pointer of type `&size` into the _interior of the enum_.
329329
To make this more clear, let's look at a diagram of memory layout in
330330
the case where `shape` points at a rectangle:
331331

332-
~~~ {.text}
332+
~~~ {.notrust}
333333
Stack Memory
334334
335335
+-------+ +---------------+
@@ -354,7 +354,7 @@ to store that shape value would still be valid, _it would have a
354354
different type_! The following diagram shows what memory would look
355355
like if code overwrote `shape` with a circle:
356356

357-
~~~ {.text}
357+
~~~ {.notrust}
358358
Stack Memory
359359
360360
+-------+ +---------------+

branches/try/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-
~~~text
34+
~~~ {.notrust}
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-
~~~text
204+
~~~ {.notrust}
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-
~~~text
350+
~~~ {.notrust}
351351
test.rs:5:8: 5:10 error: cannot assign to `*x` because it is borrowed
352352
test.rs:5 *x -= 1;
353353
^~

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn return_two_test() {
1919
To run these tests, compile with `rustc --test` and run the resulting
2020
binary:
2121

22-
~~~console
22+
~~~ {.notrust}
2323
$ rustc --test foo.rs
2424
$ ./foo
2525
running 1 test
@@ -111,7 +111,7 @@ sequentially.
111111

112112
### Typical test run
113113

114-
~~~console
114+
~~~ {.notrust}
115115
$ mytests
116116
117117
running 30 tests
@@ -125,7 +125,7 @@ result: ok. 28 passed; 0 failed; 2 ignored
125125

126126
### Test run with failures
127127

128-
~~~console
128+
~~~ {.notrust}
129129
$ mytests
130130
131131
running 30 tests
@@ -139,7 +139,7 @@ result: FAILED. 27 passed; 1 failed; 2 ignored
139139

140140
### Running ignored tests
141141

142-
~~~console
142+
~~~ {.notrust}
143143
$ mytests --ignored
144144
145145
running 2 tests
@@ -153,7 +153,7 @@ result: FAILED. 1 passed; 1 failed; 0 ignored
153153

154154
Using a plain string:
155155

156-
~~~console
156+
~~~ {.notrust}
157157
$ mytests mytest23
158158
159159
running 1 tests
@@ -164,7 +164,7 @@ result: ok. 1 passed; 0 failed; 0 ignored
164164

165165
Using some regular expression features:
166166

167-
~~~console
167+
~~~ {.notrust}
168168
$ mytests 'mytest[145]'
169169
170170
running 13 tests
@@ -247,7 +247,7 @@ Advice on writing benchmarks:
247247
To run benchmarks, pass the `--bench` flag to the compiled
248248
test-runner. Benchmarks are compiled-in but not executed by default.
249249

250-
~~~console
250+
~~~ {.notrust}
251251
$ rustc mytests.rs -O --test
252252
$ mytests --bench
253253
@@ -283,7 +283,7 @@ fn bench_xor_1000_ints(b: &mut Bencher) {
283283

284284
gives the following results
285285

286-
~~~console
286+
~~~ {.notrust}
287287
running 1 test
288288
test bench_xor_1000_ints ... bench: 0 ns/iter (+/- 0)
289289
@@ -323,7 +323,7 @@ overhead (e.g. `black_box(&huge_struct)`).
323323
Performing either of the above changes gives the following
324324
benchmarking results
325325

326-
~~~console
326+
~~~ {.notrust}
327327
running 1 test
328328
test bench_xor_1000_ints ... bench: 375 ns/iter (+/- 148)
329329

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,14 @@ pub struct Unique<T> {
213213
impl<T: Send> Unique<T> {
214214
pub fn new(value: T) -> Unique<T> {
215215
unsafe {
216-
let ptr = malloc(mem::size_of::<T>() as size_t) as *mut T;
216+
let ptr = malloc(std::mem::size_of::<T>() as size_t) as *mut T;
217217
// we *need* valid pointer.
218218
assert!(!ptr.is_null());
219219
// `*ptr` is uninitialized, and `*ptr = value` would
220220
// attempt to destroy it `overwrite` moves a value into
221221
// this memory without attempting to drop the original
222222
// value.
223-
ptr::write(&mut *ptr, value);
223+
mem::overwrite(&mut *ptr, value);
224224
Unique{ptr: ptr}
225225
}
226226
}

branches/try/src/doc/intro.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ and its implications on a task that programmers usually find very difficult: con
1818

1919
Ownership is central to Rust,
2020
and is the feature from which many of Rust's powerful capabilities are derived.
21-
"Ownership" refers to which parts of your code are allowed to read,
21+
"Ownership" refers to which parts of your code are allowed read,
2222
write, and ultimately release, memory.
2323
Let's start by looking at some C++ code:
2424

25-
```cpp
25+
```notrust
2626
int* dangling(void)
2727
{
2828
int i = 1234;
@@ -74,7 +74,7 @@ fn main() {
7474

7575
Save this program as `dangling.rs`. When you try to compile this program with `rustc dangling.rs`, you'll get an interesting (and long) error message:
7676

77-
```text
77+
```notrust
7878
dangling.rs:3:12: 3:14 error: `i` does not live long enough
7979
dangling.rs:3 return &i;
8080
^~
@@ -155,7 +155,7 @@ You can roughly compare these two lines:
155155
let i = box 1234;
156156
```
157157

158-
```cpp
158+
```notrust
159159
// C++
160160
int *i = new int;
161161
*i = 1234;
@@ -254,7 +254,7 @@ fn main() {
254254

255255
This will result an error indicating that the value is no longer in scope:
256256

257-
```text
257+
```notrust
258258
concurrency.rs:12:20: 12:27 error: use of moved value: 'numbers'
259259
concurrency.rs:12 println!("{}", numbers.get(0));
260260
^~~~~~~

0 commit comments

Comments
 (0)