Currently, `rustc` generates nondeterministic archives, which contain system timestamps. These don't really serve any useful purpose, and enabling deterministic archives moves us a little closer to completely deterministic builds. For a small toy library using `std::ops::{Deref,DerefMut}`, this change actually results in a bit-for-bit identical build every time.
eq_slice_() used to be a common implementation for two function that
both called it, but of those only eq_slice() is left, so we can as well
directly inline the code.
Work around unary negation to-be-feature-gated warning by replacing references to `-1` as a `ast::NodeId` with `ast::DUMMY_NODE_ID`, which seems like a better notation to use (it is currently also `-1`.
(AFAICT the code is not *relying* on the value `-1` anywhere, it really just needed a dummy value for when the input is `None`.)
The LTO pass in the compiler forgot to call the `LLVMRustAddBuilderLibraryInfo`
function and configure other options such as merge_functions, vectorize_slp,
etc. This ended up causing linker errors on MSVC targets because the optimizer
didn't have the right knowledge that some system functions are missing on these
platforms.
This commit consolidates creation of PassManagerBuilder instances to one
function which is then called when needed. This ensures that the pass manager is
always correctly configured with the various target-specific information that
LLVM needs.
Overall, this fixes `-C lto -C opt-level=3` on 32-bit MSVC targets.
When compiling libsyntax this removes about 30k basic blocks that only
contain a single unconditional jump and reduces the peak memory usage by
about 10MB (from 681MB down to 671MB).
Sidestep warning about repeated E0045 `span_err!` invocation.
(That is, take the two expressions with the same message and unify them into one subroutine.)
Updated "Installing Rust" and "After installation" to provide additional guidance to Windows users on including Rust in the Path system variable.
r? @steveklabnik
These provide various special readers, so point their docs to their
constructor functions in a manner consistent with everything else.
r? @alexcrichton
This is a resubmission of my previous git failure - apologies. Just fixing up a wording error that was discovered in E0253 after the r.
r? @Manishearth
Mostly through adding examples.
r? @alexcrichton
I'm going to be doing a bunch of these today, but I figured I'd keep it one PR per struct, since the last 'all the things in one PR' ended up taking a week to actually land.
The original test program exercised the (garbage-collected heap)
allocation form `box (GC) ...`, feeding an instance of `Structure` in
as the expression. This obviously went away when `GC` went away, but
there's no reason for us not to include an appropriate unit test here
for the same form, just for heap-allocated instances of `Structure`.