auto merge of #9484 : alexcrichton/rust/fix-cfg-inner-item, r=pcwalton

If an item is skipped due to it being unreachable or for some optimization, then
it shouldn't be encoded into the metadata (because it wasn't present in the
first place).
mark globals as internal when not building a library

Closes #9494
Remove the printf{,ln}! macros

These are deprecated in favor of print{,ln}!
Update the compiler to not use printf/printfln
auto merge of #9261 : alexcrichton/rust/logging, r=huonw

This lifts various restrictions on the runtime, for example the character limit
when logging a message. Right now the old debug!-style macros still involve
allocating (because they use fmt! syntax), but the new debug2! macros don't
involve allocating at all (unless the formatter for a type requires allocation.
Update version numbers to 0.9-pre
Remove a little bit of unused C++
auto merge of #9504 : brson/rust/continue, r=alexcrichton
auto merge of #9523 : huonw/rust/kud1ing-docs, r=huonw

Collation of @kud1ing's work in #9511, #9512, #9513 and #9518.
Remove `@mut Resolver`

Instead use &mut everywhere as much as possible and then reorganize lots of code
to get past the borrow checker.
std::vec: Use a valid value as lifetime dummy in iterator

The current implementation uses `&v[0]` for the lifetime struct field,
but that is a dangling pointer for iterators derived from zero-length
slices.

Example:

    let v: [int, ..0] = [];  println!("{:?}", v.iter())

    std::vec::VecIterator<,int>{ptr: (0x7f3768626100 as *()), end: (0x7f3768626100 as *()), lifetime: &139875951207128}

To replace this parameter, use a field of type `Option<&'self ()>`
that is simply initialized with `None`, but still allows the iterator to
have a lifetime parameter.
Visibility fixes
auto merge of #9525 : klutzy/rust/obsolete-span-fix, r=alexcrichton
std and rustc: Convert users of c_str to use .with_c_str
std: removed some warnings in tests.
std: implement Container for CString
std: Add benchmarks to c_str
std: Micro-optimize vec.with_c_str for short vectors

This now makes it unsafe to save the pointer returned by .with_c_str
as that pointer now may be pointing at a stack allocated array.

I arbitrarily chose 32 bytes as the length of the stack vector, and
so it might not be the most optimal size.

before:

test c_str::bench::bench_with_c_str_long ... bench: 539 ns/iter (+/- 91)
test c_str::bench::bench_with_c_str_medium ... bench: 97 ns/iter (+/- 2)
test c_str::bench::bench_with_c_str_short ... bench: 70 ns/iter (+/- 5)

after:

test c_str::bench::bench_with_c_str_long ... bench: 542 ns/iter (+/- 13)
test c_str::bench::bench_with_c_str_medium ... bench: 53 ns/iter (+/- 6)
test c_str::bench::bench_with_c_str_short ... bench: 19 ns/iter (+/- 0)
std: Remove an unnecessary comment from c_str

The documentation for `.with_c_str()` already says that the pointer
will be deallocated before returning from the function.
std: Up vec.with_c_str's stack buffer to 128

This matches @graydon's recommendation.