Drop struct fields if the user destructor fails

This commit changes drop glue generated for structs to use the invoke LLVM
instruction instead of call. What this means is that if the user destructor
triggers an unwinding, then the fields of the struct will still ge dropped.

This is not an attempt to support failing while failing, as that's mostly a
problem of runtime support. This is more of an issue of soundness in making sure
that destructors are appropriately run. The test included fails before this
commit, and only has one call to fail!(), yet it doesn't destroy its struct
fields.
Fixed formatting.

The code block shows up inline without proper formatting without this
newline.

Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
auto merge of #10219 : alexcrichton/rust/drop-invoke, r=pcwalton

This commit changes drop glue generated for structs to use the invoke LLVM
instruction instead of call. What this means is that if the user destructor
triggers an unwinding, then the fields of the struct will still ge dropped.

This is not an attempt to support failing while failing, as that's mostly a
problem of runtime support. This is more of an issue of soundness in making sure
that destructors are appropriately run. The test included fails before this
commit, and only has one call to fail!(), yet it doesn't destroy its struct
fields.
docs: Replace std::iterator with std::iter.
auto merge of #10248 : nibrahim/rust/docformatting, r=pcwalton

The code block shows up inline without proper formatting without this
newline.

Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
auto merge of #10252 : huonw/rust/docs, r=alexcrichton
simplify memcpy/memmove/memset intrinsics

This moves the per-architecture difference into the compiler.
auto merge of #10251 : thestinger/rust/ptr, r=alexcritchton

This moves the per-architecture difference into the compiler.
Ensure rustpkg test fails if tests failed

It previously set the exit status, but the main wrapper paved over that
with an exit code of 0.

Closes #9761
auto merge of #10254 : sfackler/rust/rustpkg-test-failure, r=alexcrichton

It previously set the exit status, but the main wrapper paved over that
with an exit code of 0.

Closes #9761
Fix the temporary name of the object file created

This file did not respect the #[link(name = "...")] attribute when it was
clearly intended to do so. The problem is that the crate attributes just weren't
passed in. This causes lots of problems in rust today because the object file
for all our libraries is inferred to be 'lib.o' because all of the files are
called 'lib.rs'.

I tried to figure out a good way to test for this, but I wasn't able to come up
with a good way that fit into our current testing framework. Nonetheless, I have
tested this locally and object files get named as they should. This should fix
compiling with `make -jN` again (because the object files are all different
again).
auto merge of #10260 : alexcrichton/rust/fix-temp-name, r=thestinger

This file did not respect the #[link(name = "...")] attribute when it was
clearly intended to do so. The problem is that the crate attributes just weren't
passed in. This causes lots of problems in rust today because the object file
for all our libraries is inferred to be 'lib.o' because all of the files are
called 'lib.rs'.

I tried to figure out a good way to test for this, but I wasn't able to come up
with a good way that fit into our current testing framework. Nonetheless, I have
tested this locally and object files get named as they should. This should fix
compiling with `make -jN` again (because the object files are all different
again).