auto merge of #8974 : thestinger/rust/char, r=huonw

Closes #7609
Convert rust_log.cpp to Rust, closes #8703
auto merge of #8956 : thestinger/rust/test, r=huonw
auto merge of #8966 : FlaPer87/rust/issue/7473, r=bblum

Current access methods are nestable and unsafe. This patch renames
current methods implementation - prepends unsafe_ - and implements 2 new
methods that are both safe and un-nestable.

Fixes #7473
libstd/os: set tmp dir to /data/tmp on Android

Android has no /tmp partition, return /data/tmp instead. Cf. #8511.
Another followup on #6009.

Odd that my earlier make checks did not catch this.
debuginfo: Support for variables captured in closures and closure type descriptions.
debuginfo: Support for by-value arguments (still excluding some cases of self arguments)
debuginfo: Added test cases for structs, tuples, enums, etc passed by value.

Also updated documentation comments in debuginfo and renamed DebugContext to CrateDebugContext.
debuginfo: Always copy args to allocas if debuginfo is enabled
debuginfo: Fixed some merge fallout
debuginfo: Much improved handling of captured variables and by-value arguments.
auto merge of #8901 : adridu59/rust/issue-8511, r=huonw

Android has no /tmp partition, cf. #8511.
debuginfo: Fixed some merge fallout
auto merge of #8855 : michaelwoerister/rust/captured_vars, r=jdm

This pull request includes
* support for variables captured in closures*,
* a fix for issue #8512: arguments of non-immediate type (structs, tuples, etc) passed by value can now be accessed correctly in GDB. (I managed to fix this by using `llvm::DIBuilder::createComplexVariable()`. ~~However, I am not sure if this relies on unstable implementation details of LLVM's debug info handling. I'll try to clarify this on the LLVM mailing list~~).
* simplification of the `debuginfo` module's public interface: the caller of functions like `create_local_var_metadata()` doesn't have to know and catch all cases when it mustn't call the function,
* a cleanup refactoring with unified handling for locals, [self] arguments, captured variables, and match bindings,
* and proper span information for self arguments.

\* However, see comment at https://github.com/michaelwoerister/rust/blob/1d916ace136a27e354d73d65f488603c65f65bd2/src/test/debug-info/var-captured-in-nested-closure.rs#L62 . This is the same problem as with the fix for issue #8512 above: We are probably using `llvm.dbg.declare` in an unsupported way that works today but might not work after the next LLVM update.

Cheers,
Michael

Fixes #8512
Fixes #1341
auto merge of #8880 : fhahn/rust/issue_8703, r=brson

I've started working on #8703.

RUST_LOG="::help" should work, I hope I'll be able to finish the rest this weekend.
auto merge of #8935 : blake2-ppc/rust/reader-bytes, r=brson

An iterator that simply calls `.read_bytes()` each iteration.

I think choosing to own the Reader value and implementing Decorator to
allow extracting it is the most generically useful. The Reader type
variable can of course be some kind of reference type that implements
Reader.

In the generic form the `Bytes` iterator is well behaved itself and does not read ahead.
It performs abysmally on top of a FileStream, and much better if a buffering reader is inserted inbetween.
auto merge of #8977 : pnkfelix/rust/fsk-followup-on-6009-rebased, r=alexcrichton

Fix #6009.  Rebased version of #8970.  Inherits review from alexcrichton.
Fix #7740: gather_loans should not recur into the items of the block.

gather_loans does not need to recurse into any items declared in the
current block.  Rather than special-case `fk_item_fn` and `fk_method`,
just make the GatherLoanVisitor's visit_item method a no-op.

This indirectly implies that the example of #7740 is fixed:

    fn f() {
        static A: &'static char = &'A';
    }

Since we do not recurse into items, we no longer encounter `&'A'`.
Implement Stream automatically for Reader + Writer

This is consistent with the existing documentation but was not the
actual behaviour, which I've found to be rather a nuisance, actually.