Use [[bin]] instead of [[executable]] in manifest examples
Add version command, closes #201
auto merge of #212 : fhahn/cargo/version, r=alexcrichton

This PR adds a rustc style version command
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
Fix failure on second run of 'cargo test'

Generate the right target filename for rlibs built in test
mode so that they are correctly moved back out of the old-root
directory.
Add regression test for running `cargo test` twice
auto merge of #232 : bkoropoff/cargo/fix-repeated-cargo-test, r=alexcrichton

Generate the right target filename for rlibs built in test
mode so that they are correctly moved back out of the old-root
directory.
auto merge of #222 : alexcrichton/cargo/no-cargo-toml-in-target, r=wycats

When cargo is building itself, it just ends up getting confused because the test
directory is in this location.
auto merge of #224 : alexcrichton/cargo/canonical-hash, r=wycats

This should prevent some weird bugs where if you have slightly different sources that you occasionally have to recompile them when cargo switches between one or the other (thinking they're different)
kill unnecessary lifetime annotations

This commit removes lifetime annotations
that are now automatically inferred by
the compiler.
auto merge of #236 : cburgdorf/cargo/kill_lifetimes, r=alexcrichton

This commit removes lifetime annotations
that are now automatically inferred by
the compiler.