Skip to content

Commit

Permalink
auto merge of rust-lang#19785 : brson/rust/rollup, r=brson
Browse files Browse the repository at this point in the history
  • Loading branch information
bors committed Dec 15, 2014
2 parents ef0bc46 + 1cb7e9f commit 1b97cd3
Show file tree
Hide file tree
Showing 43 changed files with 205 additions and 147 deletions.
3 changes: 1 addition & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -988,8 +988,7 @@ do
make_dir $t/rt/jemalloc
for i in \
isaac sync test \
arch/i386 arch/x86_64 arch/arm arch/mips \
sundown/src sundown/html
arch/i386 arch/x86_64 arch/arm arch/mips
do
make_dir $t/rt/stage$s/$i
done
Expand Down
3 changes: 1 addition & 2 deletions mk/ctags.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
.PHONY: TAGS.emacs TAGS.vi

# This is using a blacklist approach, probably more durable than a whitelist.
# We exclude: external dependencies (llvm, rt/{msvc,sundown,vg}),
# We exclude: external dependencies (llvm, rt/{msvc,vg}),
# tests (compiletest, test) and a couple of other things (rt/arch, etc)
CTAGS_LOCATIONS=$(patsubst ${CFG_SRC_DIR}src/llvm,, \
$(patsubst ${CFG_SRC_DIR}src/compiletest,, \
Expand All @@ -25,7 +25,6 @@ CTAGS_LOCATIONS=$(patsubst ${CFG_SRC_DIR}src/llvm,, \
$(patsubst ${CFG_SRC_DIR}src/rt,, \
$(patsubst ${CFG_SRC_DIR}src/rt/arch,, \
$(patsubst ${CFG_SRC_DIR}src/rt/msvc,, \
$(patsubst ${CFG_SRC_DIR}src/rt/sundown,, \
$(patsubst ${CFG_SRC_DIR}src/rt/vg,, \
$(wildcard ${CFG_SRC_DIR}src/*) $(wildcard ${CFG_SRC_DIR}src/rt/*) \
)))))))))
Expand Down
11 changes: 8 additions & 3 deletions src/doc/complement-bugreport.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ It's also helpful to provide the exact version and host by copying the output of
re-running the erroneous rustc command with the `--version=verbose` flag, which will
produce something like this:

```{ignore}
```text
rustc 0.12.0 (ba4081a5a 2014-10-07 13:44:41 -0700)
binary: rustc
commit-hash: ba4081a5a8573875fed17545846f6f6902c8ba8d
Expand All @@ -46,8 +46,13 @@ host: i686-apple-darwin
release: 0.12.0
```

Finally, if you can run the offending command under gdb, pasting a stack trace can be
useful; to do so, you will need to set a breakpoint on `rust_panic`.
Finally, if you can also provide a backtrace, that'd be great. You can get a
backtrace by setting the `RUST_BACKTRACE` environment variable to `1`, like
this:

```bash
$ RUST_BACKTRACE=1 rustc ...
```

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

Expand Down
2 changes: 1 addition & 1 deletion src/doc/guide-crates.md
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ fn main() {
Rust will give us a compile-time error:
```{notrust}
```text
Compiling phrases v0.0.1 (file:///home/you/projects/phrases)
/home/you/projects/phrases/src/main.rs:4:5: 4:40 error: a value named `hello` has already been imported in this module
/home/you/projects/phrases/src/main.rs:4 use phrases::japanese::greetings::hello;
Expand Down
4 changes: 2 additions & 2 deletions src/doc/guide-error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ fn main() {

This will give us an error:

```{notrust}
```text
error: non-exhaustive patterns: `_` not covered [E0004]
```

Expand Down Expand Up @@ -189,7 +189,7 @@ panic!("boom");

gives

```{notrust}
```text
task '<main>' panicked at 'boom', hello.rs:2
```

Expand Down
6 changes: 3 additions & 3 deletions src/doc/guide-ownership.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ fn add_one(mut num: Box<int>) {

This does not compile, and gives us an error:

```{notrust}
```text
error: use of moved value: `x`
println!("{}", x);
^
Expand Down Expand Up @@ -208,7 +208,7 @@ the function is over, and `num` goes out of scope, the borrow is over.
Lending out a reference to a resource that someone else owns can be
complicated, however. For example, imagine this set of operations:

1. I aquire a handle to some kind of resource.
1. I acquire a handle to some kind of resource.
2. I lend you a reference to the resource.
3. I decide I'm done with the resource, and deallocate it, while you still have
your reference.
Expand Down Expand Up @@ -406,7 +406,7 @@ fn main() {
We try to make four `Wheel`s, each with a `Car` that it's attached to. But the
compiler knows that on the second iteration of the loop, there's a problem:

```{notrust}
```text
error: use of moved value: `car`
Wheel { size: 360, owner: car };
^~~
Expand Down
16 changes: 8 additions & 8 deletions src/doc/guide-pointers.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ println!("{}", x + z);

This gives us an error:

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

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

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

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

```{ignore}
```text
func mutate(&int i, int j) {
*i = j;
}
Expand Down Expand Up @@ -398,7 +398,7 @@ fn main() {

It gives this error:

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

As being similar to this C code:

```{ignore}
```c
{
int *x;
x = (int *)malloc(sizeof(int));
Expand Down Expand Up @@ -626,7 +626,7 @@ fn main() {

This prints:

```{ignore}
```text
Cons(1, box Cons(2, box Cons(3, box Nil)))
```

Expand Down
Loading

0 comments on commit 1b97cd3

Please sign in to comment.