Fix many warnings.
Register snapshots
auto merge of #6632 : steveklabnik/rust/remove_more_warnings, r=thestinger

With this, the build is almost 100% warning free.

One more can be fixed after the next snapshot, and there's one other that I filed an issue about already.
auto merge of #6635 : brson/rust/snapshot, r=brson
Remove outdated function transmute_for_stage0

The function was a workaround for bootstrapping that isn't required
anymore and just degrades hashmap performance, as it doesn't get inlined
cross-crate and turns a no-op into a call.
auto merge of #6640 : dotdash/rust/hash_perf, r=bstrie

The function was a workaround for bootstrapping that isn't required
anymore and just degrades hashmap performance, as it doesn't get inlined
cross-crate and turns a no-op into a call.
Remove legacy_modes
auto merge of #6643 : sanxiyn/rust/legacy-modes, r=bstrie
librustc: classify newtype scalar structs as immediates.
librustc: Fix LLVM assertion with immediates and by-value self.
Add test for #5321.
librustc: Also treat a struct with a single scalar field as an immediate.
librustc: Update comment to reflect changes.