Use the result of privacy for reachability

This fixes a bug in which the visibility rules were approximated by
reachability, but forgot to cover the case where a 'pub use' reexports a private
item. This fixes the commit by instead using the results of the privacy pass of
the compiler to create the initial working set of the reachability pass.

This may have the side effect of increasing the size of metadata, but it's
difficult to avoid for correctness purposes sadly.

Closes #9790
Add `pub` to all the codegen tests

Otherwise the test function is internalized and LLVM will most likely optimize
it out.
auto merge of #9791 : alexcrichton/rust/reachable, r=catamorphism

This fixes a bug in which the visibility rules were approximated by
reachability, but forgot to cover the case where a 'pub use' reexports a private
item. This fixes the commit by instead using the results of the privacy pass of
the compiler to create the initial working set of the reachability pass.

This may have the side effect of increasing the size of metadata, but it's
difficult to avoid for correctness purposes sadly.

Closes #9790
Fix usage of <float> in docs

The example for std::rand::random was still
using <float>, which got removed from Rust.
Register new snapshots
auto merge of #9797 : alexcrichton/rust/snapshots, r=thestinger

Some bug fixes to reexported statics in stage0 now, also some macro attribute goodies. Mostly just updating the snapshot to help enable some things that its patches have been blocking.
Fixed typo under 'Segmented stacks and the linter', and removed superfluous trailing whitespace.
rust / build: Remove the `rust` tool

Sadly, there's a lack of resources for maintaining the `rust` tool,
and we decided in the 2013-10-08 Rust team meeting that it's better
to remove it altogether than to leave it in a broken state.

This deletion is without prejudice. If a person or people appear who
would like to maintain the tool, we will probably be happy to
resurrect it!

Closes #9775
auto merge of #9798 : mtwilliams/rust/master, r=brson

I also removed superfluous trailing whitespace.

I don't think I need to run the test suite.
rustpkg: Make checked-out source files read-only, and overhaul where temporary files are stored

rustpkg now makes source files that it checks out automatically read-only, and stores
them under build/.

Also, refactored the `PkgSrc` type to keep track of separate source and destination
workspaces, as well as to have a `build_workspace` method that returns the workspace
to put temporary files in (usually the source, sometimes the destination -- see
comments for more details).

Closes #6480
auto merge of #9800 : vmx/rust/fix-random-doc, r=thestinger

The example for std::rand::random was still
using <float>, which got removed from Rust.
improve C ABI

I borrow some ideas from clang's ABIInfo.h and TargetInfo.cpp.
LLVMType is replaced with ArgType, which is similar to clang's ABIArgInfo,
and I also merge attrs of FnType into it.

Now ABI implementation doesn't need to insert hidden return pointer
to arg_tys of FnType. Instead it is handled in foreign.rs.

This change also fixes LLVM assertion failure when compiling MIPS target.
auto merge of #9732 : catamorphism/rust/rustpkg-read-only, r=brson

r? @metajack rustpkg now makes source files that it checks out automatically read-only, and stores
them under build/.

Also, refactored the `PkgSrc` type to keep track of separate source and destination
workspaces, as well as to have a `build_workspace` method that returns the workspace
to put temporary files in (usually the source, sometimes the destination -- see
comments for more details).

Closes #6480
Remove named extern blocks from the AST

There's currently a fair amount of code which is being ignored on unnamed blocks
(which are the default now), and I opted to leave it commented out for now. I
intend on very soon revisiting on how we perform linking with extern crates in
an effort to support static linking.
auto merge of #9785 : catamorphism/rust/remove-convenience-tool, r=pcwalton

r? @pcwalton Sadly, there's a lack of resources for maintaining the `rust` tool,
and we decided in the 2013-10-08 Rust team meeting that it's better
to remove it altogether than to leave it in a broken state.

This deletion is without prejudice. If a person or people appear who
would like to maintain the tool, we will probably be happy to
resurrect it!

Closes #9775
auto merge of #9517 : crabtw/rust/cabi, r=nikomatsakis

I borrow some ideas from clang's ABIInfo.h and TargetInfo.cpp.
LLVMType is replaced with ArgType, which is similar to clang's ABIArgInfo,
and I also merge attrs of FnType into it.

Now ABI implementation doesn't need to insert hidden return pointer
to arg_tys of FnType. Instead it is handled in foreign.rs.

This change also fixes LLVM assertion failure when compiling MIPS target.
auto merge of #9804 : alexcrichton/rust/always-anon-extern, r=brson

There's currently a fair amount of code which is being ignored on unnamed blocks
(which are the default now), and I opted to leave it commented out for now. I
intend on very soon revisiting on how we perform linking with extern crates in
an effort to support static linking.
Add tests and un-xfail a few issues

Closes #4545
Closes #5791
Closes #6470
Closes #8044
extra::tempfile: replace mkdtemp with an RAII wrapper

this incidentally stops `make check` from leaving directories in `/tmp`
De-pub some private runtime components

This change was waiting for privacy to get sorted out, which should be true now
that #8215 has landed.

Closes #4427