Fix inferred name of `src/main.rs`

The crate name should be the package name, not `main`.

Closes #207
auto merge of #208 : alexcrichton/cargo/fix-main-name, r=wycats

The crate name should be the package name, not `main`.

Closes #207
Use indexing instead of get() function to access Vec
auto merge of #213 : fhahn/cargo/fix-warnings-2, r=alexcrichton

This patch replaces `get()` calls with indexing for vectors and `str::from_utf8_lossy` with `String::from_ut8_lossy` to silence recent rustc warnings
Use [[bin]] instead of [[executable]] in manifest examples
Add version command, closes #201
Update to master
auto merge of #219 : alexcrichton/cargo/update-to-mater, r=burningtree
auto merge of #212 : fhahn/cargo/version, r=alexcrichton

This PR adds a rustc style version command
Update hammer to fix `cargo build -h`.
auto merge of #217 : gchp/cargo/docs, r=alexcrichton

There were inconsistencies in the manifest file between using `[[bin]]` and `[[executable]]`. I've changed the examples to use `[[bin]]` for consistency.
auto merge of #220 : erickt/cargo/master, r=alexcrichton

Please don't land this until https://github.com/wycats/hammer.rs/pull/12 is landed, or else it will break the build.
Blow away all directories/files on each build

And aftewards selectively move them back into place if they're fresh. This
prevents stale files from showing up from old builds.

This currently breaks anyone build `build=` scripts, the fix is coming in the
next commit.

Closes #205
House all native build output in a per-package dir

In order to ensure there are no stale artifacts as part of a build, this commit
houses all output of native build commands in their own directories. Each
directory is on a per-package basis, and the output is preserved if the package
is fresh or discarded if it is not.

This does not remove the DEPS_DIR environment variable, it just wires it to the
same value as OUT_DIR.
auto merge of #216 : alexcrichton/cargo/issue-205, r=wycats

As discovered in #205, cargo wasn't properly ensuring a fresh build state for new builds. As commented in #205, this is an easy way to have a non deterministic build which is one of cargo's major goals to avoid. These commits rectify the situation.

All build output is now "obliterated" by moving to a location unknown to the compiler as soon as a build starts. All fresh output is moved back into place automatically, and all dirty output will only have known artifacts available to it.

The major consequence of this strategy is that the location of the output of the `build` command must also change. Instead of spraying into a shared directory, build commands are now contained to their own build directory which is entirely removed on rebuild or entirely preserved on a fresh build. There's more documentation in the new `layout.rs` about the build directory structure.

In general this should not have much impact as a user-facing change.
Canonicalize URLs when hashing sources
Don't look inside target/ for sub-packages

When cargo is building itself, it just ends up getting confused because the test
directory is in this location.
fix deprecated usage
Factor the metadata into test filenames

Closes #221
Closes #226
auto merge of #231 : alexcrichton/cargo/burningtree, r=burningtree