Skip to content

Commit df79a9b

Browse files
committed
---
yaml --- r: 163102 b: refs/heads/try c: b10907c h: refs/heads/master v: v3
1 parent 0a89ed5 commit df79a9b

Some content is hidden

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

90 files changed

+10897
-8203
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: 9146a919b616e39e528e4d7100d16eef52f1f852
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cafe2966770ff377aad6dd9fd808e68055587c58
5-
refs/heads/try: 04b4b500b9c602c45c7cd5264e969e1a91c1a99d
5+
refs/heads/try: b10907ca1eff16597c5bb170524a7fed1126d5ea
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ It's also helpful to provide the exact version and host by copying the output of
3737
re-running the erroneous rustc command with the `--version=verbose` flag, which will
3838
produce something like this:
3939

40-
```{ignore}
40+
```text
4141
rustc 0.12.0 (ba4081a5a 2014-10-07 13:44:41 -0700)
4242
binary: rustc
4343
commit-hash: ba4081a5a8573875fed17545846f6f6902c8ba8d
@@ -46,8 +46,13 @@ host: i686-apple-darwin
4646
release: 0.12.0
4747
```
4848

49-
Finally, if you can run the offending command under gdb, pasting a stack trace can be
50-
useful; to do so, you will need to set a breakpoint on `rust_panic`.
49+
Finally, if you can also provide a backtrace, that'd be great. You can get a
50+
backtrace by setting the `RUST_BACKTRACE` environment variable to `1`, like
51+
this:
52+
53+
```bash
54+
$ RUST_BACKTRACE=1 rustc ...
55+
```
5156

5257
# I submitted a bug, but nobody has commented on it!
5358

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ fn main() {
452452
453453
Rust will give us a compile-time error:
454454
455-
```{notrust}
455+
```text
456456
Compiling phrases v0.0.1 (file:///home/you/projects/phrases)
457457
/home/you/projects/phrases/src/main.rs:4:5: 4:40 error: a value named `hello` has already been imported in this module
458458
/home/you/projects/phrases/src/main.rs:4 use phrases::japanese::greetings::hello;

branches/try/src/doc/guide-error-handling.md

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

7777
This will give us an error:
7878

79-
```{notrust}
79+
```text
8080
error: non-exhaustive patterns: `_` not covered [E0004]
8181
```
8282

@@ -189,7 +189,7 @@ panic!("boom");
189189

190190
gives
191191

192-
```{notrust}
192+
```text
193193
task '<main>' panicked at 'boom', hello.rs:2
194194
```
195195

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ fn add_one(mut num: Box<int>) {
130130

131131
This does not compile, and gives us an error:
132132

133-
```{notrust}
133+
```text
134134
error: use of moved value: `x`
135135
println!("{}", x);
136136
^
@@ -406,7 +406,7 @@ fn main() {
406406
We try to make four `Wheel`s, each with a `Car` that it's attached to. But the
407407
compiler knows that on the second iteration of the loop, there's a problem:
408408

409-
```{notrust}
409+
```text
410410
error: use of moved value: `car`
411411
Wheel { size: 360, owner: car };
412412
^~~

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ println!("{}", x + z);
8484

8585
This gives us an error:
8686

87-
```{notrust}
87+
```text
8888
hello.rs:6:24: 6:25 error: mismatched types: expected `int` but found `&int` (expected int but found &-ptr)
8989
hello.rs:6 println!("{}", x + z);
9090
^
@@ -132,7 +132,7 @@ Pointers are useful in languages that are pass-by-value, rather than
132132
pass-by-reference. Basically, languages can make two choices (this is made
133133
up syntax, it's not Rust):
134134

135-
```{ignore}
135+
```text
136136
func foo(x) {
137137
x = 5
138138
}
@@ -152,7 +152,7 @@ and therefore, can change its value. At the comment, `i` will be `5`.
152152
So what do pointers have to do with this? Well, since pointers point to a
153153
location in memory...
154154

155-
```{ignore}
155+
```text
156156
func foo(&int x) {
157157
*x = 5
158158
}
@@ -191,7 +191,7 @@ knows. This might be harmless, and it might be catastrophic.
191191
When you combine pointers and functions, it's easy to accidentally invalidate
192192
the memory the pointer is pointing to. For example:
193193

194-
```{ignore}
194+
```text
195195
func make_pointer(): &int {
196196
x = 5;
197197
@@ -213,7 +213,7 @@ As one last example of a big problem with pointers, **aliasing** can be an
213213
issue. Two pointers are said to alias when they point at the same location
214214
in memory. Like this:
215215

216-
```{ignore}
216+
```text
217217
func mutate(&int i, int j) {
218218
*i = j;
219219
}
@@ -398,7 +398,7 @@ fn main() {
398398

399399
It gives this error:
400400

401-
```{notrust}
401+
```text
402402
test.rs:5:8: 5:10 error: cannot assign to `*x` because it is borrowed
403403
test.rs:5 *x -= 1;
404404
^~
@@ -522,7 +522,7 @@ boxes, though. As a rough approximation, you can treat this Rust code:
522522

523523
As being similar to this C code:
524524

525-
```{ignore}
525+
```c
526526
{
527527
int *x;
528528
x = (int *)malloc(sizeof(int));
@@ -626,7 +626,7 @@ fn main() {
626626

627627
This prints:
628628

629-
```{ignore}
629+
```text
630630
Cons(1, box Cons(2, box Cons(3, box Nil)))
631631
```
632632

0 commit comments

Comments
 (0)