Add #[cfg(debug)] flag to rust suite compilation. Closes #3068
auto merge of #6311 : indutny/rust/fix/handle-io-fread-errors, r=z0w0

When, occasionally, trying to read directory instead of file, `fread()`
returns `EISDIR` error. And, considering, absence of error handling,
`read_whole_stream()` just loops indefinitely.
Remove #[cfg(notest)] and use #[cfg(not(test))] to cooincide with #[cfg(debug)]
auto merge of #6317 : brson/rust/durable, r=z0w0

#6312
auto merge of #6321 : ILyoan/rust/test4350, r=z0w0
testsuite: xfail tests for windows
libstd: convert chained ifs to a match in base64.
auto merge of #6267 : huonw/rust/syntax-deriving-generaliseder, r=nikomatsakis

This "finishes" the generic deriving code (which I started in #5640), in the sense it supports everything that I can think of being useful. (Including lifetimes and type parameters on methods and traits, arguments and return values of (almost) any type, static methods.)

It closes #6149, but met with #6257, so the following doesn't work:
```rust
#[deriving(TotalEq)]
struct Foo<'self>(&'self int);
```
(It only fails for `TotalOrd`, `TotalEq` and `Clone`, since they are the only ones that call a method directly on sub-elements of the type, which means that the auto-deref interferes with the pointer.)

It also makes `Rand` (chooses a random variant, fills the fields with random values, including recursively for recursive types) and `ToStr` (`x.to_str()` is the same as `fmt!("%?", x)`) derivable, as well as converting IterBytes to the generic code (which made the code 2.5x shorter, more robust and added support for tuple structs).

({En,De}codable are trickier, so I'll convert them over later.)
auto merge of #6323 : brson/rust/nullary, r=thestinger

There's no need to delegate to C to call the Rust main function.
auto merge of #6326 : z0w0/rust/cfg-debug, r=yichoi
Fix typos
rustc: Fix the logic for finding the Android main function

I don't understand what this logic is doing
auto merge of #6119 : brson/rust/main, r=brson

r? @ILyoan

This pulls all the logic for discovering the crate entry point into a new pass (out of resolve and typeck), then changes it so that main is only looked for at the crate level (`#[main]` can still be used anywhere).

I don't understand the special android logic here and worry that I may have broken it.
fix incorrect region code based on the old 'self

also removes unnecessary casts from the RcMut implementation
auto merge of #6214 : sanxiyn/rust/simd-2, r=graydon

At the moment this only includes type checking and there is no code generation support yet. I wanted to get the design reviewed first.

From discussion with @graydon at #5841, re-implemented as `#[simd]` attribute on structs.

Progressing towards #3499.
rename iter::iter_to_vec to iter::to_vec

it's silly to duplicate the namespace in the fn name
libstd: Remove mutable fields from fileinput and net_tcp
libstd: Remove mutable fields from flatpipes and io_util
libstd: Remove mutable fields from future and par
libstd: Start warning about mutable fields, now that they only exist in stage0