Perform expansion before stripping/building a test harness.

This allows macros to create tests and benchmarks.
Include static methods on traits in reexports.
librustc: allow destructuring of structs with destructors if the pattern has no moves.

This check only works for `match`s, the checks (incorrectly) do not run for patterns in
`let`s.
Issue number on xfailed test
renamed vec::from_slice to vec::to_owned
Add some positive tests for dtor struct destructuring
renamed str::from_slice to str::to_owned
Fixes rusti crashes.

Don't pass the binary name to the LLVMRustExecuteJIT closure; doesn't
seem to be needed, anyhow.
Replace io::println by println as it is now included in prelude.rs
more back-ticks, less colons
Remove core executable
Test case for issue #4202
auto merge of #6384 : thomaslee/rust/issue-4202, r=catamorphism

This fixes the issue described in #4202.

From what I understood of the code, when we reexport a trait in a submodule using e.g. "pub use foo::SomeTrait", we were not previously making an effort to reexport the static methods on that trait.

I'm new to the Rust code base (and the Rust language itself) so my approach may not be kosher, but this patch works by changing the encoder to include the static methods associated with traits.

I couldn't see any tests for this area of the code, so I didn't really have any examples to go by. If tests are needed, I'm happy to work through that if I can get some assistance to do so.
Correct testcases that passed because fns with #[test] were stripped before expansion.
auto merge of #6383 : huonw/rust/rustc-expand-then-strip, r=thestinger

This allows macros to create tests and benchmarks.

This is possibly unsound (I've got no idea, but it seemed to work), and being able to programmatically generate benchmarks to compare several implementations of similar algorithms is nice.
auto merge of #6385 : huonw/rust/rustc-dtor-struct-match, r=nikomatsakis

**Caveat**: With the current commit, this check only works for `match`s, the checks (incorrectly) do not run for patterns in `let`s, and invalid/unsafe code compiles.

I don't know how to fix this, I experimented with some things to try to make let patterns and match patterns run on the same code (since this would presumably fix many of the other unsoundness issues of let-patterns, e.g. #6225), but I don't understand enough of the code. (I think I heard someone talking about a fix for `let` being in progress?)

Fixes #6344 and #6341.
auto merge of #6389 : sonwow/rust/issue-3356, r=bstrie

Fix for #3356
auto merge of #6397 : cantsin/rust/rusti-fixes, r=catamorphism

Fixes #6378

Don't pass the binary name to the LLVMRustExecuteJIT closure, otherwise it will leak memory; the binary name doesn't seem to be needed, anyhow.
auto merge of #6398 : osaut/rust/master, r=bstrie

I have replaced io::println by println in the tutorial as I do not think it is needed anymore since it is already included in prelude.rs.
libcore: Change `each_val` to follow new for-loop protocol