Fix path parsing
Add build_lib_with_cfgs, build_bin_with_cfgs to rustpkg API. Closes #9944.
Introduce an io::Buffer trait

This trait is meant to abstract whether a reader is actually implemented with an
underlying buffer. For all readers which are implemented as such, we can
efficiently implement things like read_char, read_line, read_until, etc. There
are two required methods for managing the internal buffer, and otherwise
read_line and friends can all become default methods.

Closes #10334
Fix the `num_lit` grammar in the reference manual.

- Cause `0` to be considered a valid integer literal (it is).
- Add octal literals (missed from #10243).

I have *not* modified doc/po/rust.md.pot or doc/po/ja/rust.md.po at all;
they already seem to be out of date so it's easier to ignore them for
myself. I can update them if desired, of course.
Implement read_char on the Buffer trait
lint: _-prefixed variables don't get an unused-mut warning.

Bringing it into line with the unused-variable one,

    fn main() {
        let mut _a = 1;
    }

will not warn that `_a` is never used mutably.

Fixes #6911.
auto merge of #10420 : sanxiyn/rust/path, r=cmr

Fix #10283.
extra: handle an edge case in BigUint.to_str().

If any of the digits was one past the maximum (e.g. 10**9 for base 10),
then this wasn't detected correctly and so the length of the digit was
one more than expected, causing a very large allocation.

Fixes #10522.
Fixes #10288.
auto merge of #10454 : z0w0/rust/issue-9944, r=cmr

Allows you to provide explicit `--cfg` flags when building certain packages through the rustpkg API.
auto merge of #10466 : alexcrichton/rust/issue-10334, r=cmr

These commits create a `Buffer` trait in the `io` module which represents an I/O reader which is internally buffered. This abstraction is used to reasonably implement `read_line` and `read_until` along with at least an ok implementation of `read_char` (although I certainly haven't benchmarked `read_char`).
auto merge of #10509 : cmr/rust/trait_name, r=alexcrichton

Rebase + fix of #10118
auto merge of #10510 : chris-morgan/rust/fix-num_lit-grammar-in-the-reference-manaul, r=cmr

- Cause `0` to be considered a valid integer literal (it is).
- Add octal literals (missed from #10243).

I have *not* modified doc/po/rust.md.pot or doc/po/ja/rust.md.po at all;
they already seem to be out of date so it's easier to ignore them for
myself. I can update them if desired, of course.
auto merge of #10518 : huonw/rust/6911, r=alexcrichton

Bringing it into line with the unused-variable one,

    fn main() {
        let mut _a = 1;
    }

will not warn that `_a` is never used mutably.

Fixes #6911.
auto merge of #10523 : huonw/rust/10522, r=cmr

If any of the digits was one past the maximum (e.g. 10**9 for base 10),
then this wasn't detected correctly and so the length of the digit was
one more than expected, causing a very large allocation.

Fixes #10522.
Fixes #10288.
Add a test for #6976

Closes #6976
Better error message when using vectors in statics

Closes #10487