rustc: Remove CrateId and all related support

This commit removes all support in the compiler for the #[crate_id] attribute
and all of its derivative infrastructure. A list of the functionality removed is:

* The #[crate_id] attribute no longer exists
* There is no longer the concept of a version of a crate
* Version numbers are no longer appended to symbol names
* The --crate-id command line option has been removed

To migrate forward, rename #[crate_id] to #[crate_name] and only the name of the
crate itself should be mentioned. The version/path of the old crate id should be
removed.

For a transitionary state, the #[crate_id] attribute is still accepted if
the #[crate_name] is not present, but it is warned about if it is the only
identifier present.

RFC: 0035-remove-crate-id
[breaking-change]
rustc: Add a new codegen flag, -C metadata=foo

This metadata is used to drive the hash of all symbols in a crate. The flag can
be specified a multiple number of times

RFC: 0035-remove-crate-id
rustc: Modify crate loading to ignore versions

This commit modifies crate loading to purely work off a `crate_name` and nothing
else. This commit also changes the patterns recognized from `lib<foo>-*` to
`lib<foo>*` to accomodate the future renamings of output files.

RFC: 0035-remove-crate-id
Add #[crate_name] attributes as necessary
rustc: Stop putting hashes in filenames by default

The compiler will no longer insert a hash or version into a filename by default.
Instead, all output is simply based off the crate name being compiled. For
example, a crate name of `foo` would produce the following outputs:

* bin => foo
* rlib => libfoo.rlib
* dylib => libfoo.{so,dylib} or foo.dll
* staticlib => libfoo.a

The old behavior has been moved behind a new codegen flag,
`-C extra-filename=<hash>`. For example, with the "extra filename" of `bar` and
a crate name of `foo`, the following outputs would be generated:

* bin => foo (same old behavior)
* rlib => libfoobar.rlib
* dylib => libfoobar.{so,dylib} or foobar.dll
* staticlib => libfoobar.a

The makefiles have been altered to pass a hash by default to invocations of
`rustc` so all installed rust libraries will have a hash in their filename. This
is done because the standard libraries are intended to be installed into
privileged directories such as /usr/local. Additionally, it involves very few
build system changes!

RFC: 0035-remove-crate-id
[breaking-change]
rustc: Add a flag for specifying dependencies

This comit implements a new flag, --extern, which is used to specify where a
crate is located. The purpose of this flag is to bypass the normal crate
loading/matching of the compiler to point it directly at the right file.

This flag takes the form `--extern foo=bar` where `foo` is the name of a crate
and `bar` is the location at which to find the crate. Multiple `--extern`
directives are allowed with the same crate name to specify the rlib/dylib pair
for a crate. It is invalid to specify more than one rlib or more than one dylib,
and it's required that the crates are valid rust crates.

I have also added some extensive documentation to metadata::loader about how
crate loading should work.

RFC: 0035-remove-crate-id
test: Fix tests for crate_id removal

This involved removing some tests whose functionality was removed such as many
of the crateresolve tests
rustc: Repurpose the --crate-name CLI flag

In a cargo-driven world the primary location for the name of a crate will be in
its manifest, not in the source file itself. The purpose of this flag is to
reduce required duplication for new cargo projects.

This is a breaking change because the existing --crate-name flag actually
printed the crate name. This flag was renamed to --print-crate-name, and to
maintain consistence, the --crate-file-name flag was renamed to
--print-file-name.

To maintain backwards compatibility, the --crate-file-name flag is still
recognized, but it is deprecated.

[breaking-change]
Test fixes and rebase conflicts
rustc: Default #[crate_name] on input, not output
auto merge of #15319 : alexcrichton/rust/no-crate-id, r=brson

This is an implementation of [RFC 35](https://github.com/rust-lang/rfcs/blob/master/active/0035-remove-crate-id.md).

The summary for this PR is the same as that of the RFC, with one addendum:


* Removes the `#[crate_id]` attribute and knowledge of versions from rustc.
* Added a `#[crate_name]` attribute similar to the old `#[crate_id]` attribute
* Output filenames no longer have versions or hashes
* Symbols no longer have versions (they still have hashes)
* A new flag, `--extern`, is used to override searching for external crates
* A new flag, `-C metadata=foo`, used when hashing symbols
* [added] An old flag, `--crate-name`, was re purposed to specify the crate name from the command line.

I tried to maintain backwards compatibility wherever possible (with warnings being printed). If I missed anywhere, however, please let me know!

[breaking-change]

Closes #14468
Closes #14469
Closes #14470
Closes #14471
Squashed commit of the following:

commit 7be704808f3938b76bef4c8c30b2893d582c2250
Author: mitchmindtree <mitchell.nordine@gmail.com>
Date:   Sun Jul 6 11:09:30 2014 +1000

    Removed accidental inclusion of old commit with Show for RefCell

commit 77fc7865d999c0a34dc69b635c76704e600a2ad0
Author: mitchmindtree <mitchell.nordine@gmail.com>
Date:   Sun Jul 6 11:04:43 2014 +1000

    Added fixme to implementation of Encodable, added test for deriving Encodable and Decodable on type with Cell and RefCell

commit b6040ae535f993b569d175c2e4c6be3ae6a7a42b
Merge: b873499 b8ef5cf
Author: mitchmindtree <mitchell.nordine@gmail.com>
Date:   Sun Jul 6 09:29:20 2014 +1000

    Merge remote-tracking branch 'upstream/master'

commit b8ef5cf1310a7b1e31d0993885d867a6804597ad
Merge: c8b2a31 4703bb4
Author: bors <bors@rust-lang.org>
Date:   Sat Jul 5 19:56:39 2014 +0000

    auto merge of #15225 : Ryman/rust/liburl_minor, r=alexcrichton

    See commits for info, a number of these are 'breaking', although liburl is marked experimental so I'm not sure that matters so much.

    First two commits will be impacted if #15138 is adopted, but it's a simple rename.

commit c8b2a3167b068f7ea30eebcfa7ad13d4c7ea3026
Merge: aaff4e0 f37e202
Author: bors <bors@rust-lang.org>
Date:   Sat Jul 5 18:11:43 2014 +0000

    auto merge of #15431 : iliekturtles/rust/13279-error-msg-order, r=pcwalton

    Moved note after error to reduce confusion when the pair appears in the
    middle of other errors. Closes #13279.

commit aaff4e05e19b48d81e4ecb3337f288f42d06edd0
Merge: 98eb5f7 4c1fdd0
Author: bors <bors@rust-lang.org>
Date:   Sat Jul 5 16:26:44 2014 +0000

    auto merge of #15429 : kballard/rust/vim_tab_conventions, r=pcwalton

commit 98eb5f7498902de6ff19a1bb70155ca0cd16907c
Merge: c8bbba9 9deeaef
Author: bors <bors@rust-lang.org>
Date:   Sat Jul 5 14:41:44 2014 +0000

    auto merge of #15428 : phildawes/rust/master, r=huonw

    Fix small bug introduced in e38cb972dcf: PatIdent span was incorrect
    because self.last_span was being used before the ident token was
    parsed.

commit c8bbba9a4be37128dc000c8a4c00ffe180219bb6
Merge: 342321d 45e52a1
Author: bors <bors@rust-lang.org>
Date:   Sat Jul 5 12:56:44 2014 +0000

    auto merge of #15427 : aochagavia/rust/parse, r=pcwalton

commit 342321def69789fb45f73f61bf3ab646b01e4bca
Merge: e0d3cf6 1af8663
Author: bors <bors@rust-lang.org>
Date:   Sat Jul 5 11:11:47 2014 +0000

    auto merge of #15442 : luqmana/rust/odp, r=pnkfelix

    Inadvertently changed the order in which destructors ran in certain cases with #15076.

    Fixes #15438.

commit e0d3cf6b2a1db489520712f7e0a47874176c35de
Merge: b00f4ec 4459fe3
Author: bors <bors@rust-lang.org>
Date:   Sat Jul 5 08:31:48 2014 +0000

    auto merge of #15418 : pnkfelix/rust/fsk-revise-VecPerParamSpace, r=pcwalton

    In my informal measurements, this brings the peak memory usage when
    building librustc from 1662M down to 1502M.  Since 1662 - 1502 = 160,
    this may not recover the entirety of the observed memory regression
    (250M) from PR #14604.  (However, according to my local measurements,
    the regression when building librustc was more like 209M, so perhaps
    this will still recover the lions share of the lost memory.)

commit b00f4ec8f17e7007c9032114c5b0d0d50ab18522
Merge: d611800 a4b1361
Author: bors <bors@rust-lang.org>
Date:   Sat Jul 5 06:46:47 2014 +0000

    auto merge of #15414 : zsiciarz/rust/patch-1, r=alexcrichton

commit d611800a70e6f620b5f96d8509899377a784b364
Merge: 29d6a8e 8ef0165
Author: bors <bors@rust-lang.org>
Date:   Sat Jul 5 05:01:49 2014 +0000

    auto merge of #15284 : apoelstra/rust/bitv-methods, r=cmr

    The types `Bitv` and `BitvSet` are badly out of date. This PR:
    - cleans up the code (primarily, simplifies `Bitv` and implements `BitvSet` in terms of `Bitv`)
    - implements several new traits for `Bitv`
    - adds new functionality to `Bitv` and `BitvSet`
    - replaces internal iterators with external ones
    - updates documentation
    - minor bug fixes

    This is a significantly souped-up version of PR #15139 and is the result of the discussion there.

commit 4459fe3e5ef84bc25a93c7c388006465b157dab2
Author: Felix S. Klock II <pnkfelix@pnkfx.org>
Date:   Fri Jul 4 18:47:59 2014 +0200

    Revise `VecPerParamSpace` to use a one Vec rather than three.

    In my informal measurements, this brings the peak memory usage when
    building librustc from 1662M down to 1502M.  Since 1662 - 1502 = 160,
    this may not recover the entirety of the observed memory regression
    (250M) from PR #14604.  (However, according to my local measurements,
    the regression when building librustc was more like 209M, so perhaps
    this will still recover the lions share of the lost memory.)

commit 952dded81a0a5c51ce802ae6753dd69f45e9ce61
Author: Felix S. Klock II <pnkfelix@pnkfx.org>
Date:   Fri Jul 4 16:39:28 2014 +0200

    Refactored VecPerParamSpace to hide exposure of `Vec` representation.

    This basically meant changing the interface so that no borrowed `&Vec`
    is exposed, by hiding `fn get_vec` and `fn get_mut_vec` and revising
    `fn all_vecs`.

    Instead, clients should use one of the other methods; `get_slice`,
    `pop`, `truncate`, `replace`, `push_all`, or `is_empty_in`, which
    should work for any case currently used in rustc.

commit 29d6a8ecc6f43bac7171267993ef07dfdf528281
Merge: 9f2a43c cc13f9b
Author: bors <bors@rust-lang.org>
Date:   Sat Jul 5 03:16:50 2014 +0000

    auto merge of #15425 : jbclements/rust/hygiene-for-3-kinds-of-args, r=cmr

    This pull request adds hygiene for 3 kinds of argument bindings:
    - arguments to item fns,
    - arguments to `ExprFnBlock`s, and
    - arguments to `ExprProc`s

    It also adds a bunch of unit tests, fixes a few macro uses to be non-capturing, and has a few cleanup items.

    local `make check` succeeds.

commit 9f2a43c1b518a674ef4bb368732ee8dac3c1f779
Merge: 459f155 67c8a8d
Author: bors <bors@rust-lang.org>
Date:   Sat Jul 5 01:31:52 2014 +0000

    auto merge of #15419 : erickt/rust/json, r=pcwalton

    This speeds up json serialization by removing most of the allocations.

commit 1af8663579c0e0eb08fda29df51d0eefb2e2b6de
Author: Luqman Aden <me@luqman.ca>
Date:   Fri Jul 4 17:55:51 2014 -0700

    librustc: Make sure to run destructors in the right order when matching on moved value.

commit 67c8a8d5dd90e476d0579df3738fe1e744ef68f1
Author: Erick Tryzelaar <erick.tryzelaar@gmail.com>
Date:   Fri Jul 4 16:56:23 2014 -0700

    serialize: speed up json pretty printing by batch writing spaces

commit 459f155f81291c46633e86a480628b50304ffb1c
Merge: 9897160 4c9cca4
Author: bors <bors@rust-lang.org>
Date:   Fri Jul 4 23:46:44 2014 +0000

    auto merge of #15415 : dgoon/rust/master, r=alexcrichton

commit 717de500eefc2f501f12587fc9626944ab593ff8
Author: Erick Tryzelaar <erick.tryzelaar@gmail.com>
Date:   Fri Jul 4 16:36:49 2014 -0700

    serialize: escaping json strings should write in batches.

    This significantly speeds up encoding json strings.

commit f37e202b53d208cd65f45fa96d2f2453b26bb9ee
Author: Mike Boutin <mike.boutin@gmail.com>
Date:   Fri Jul 4 17:25:27 2014 -0400

    rustc: Reorder error and note message to reduce confusion.

    Moved note after error to reduce confusion when the pair appears in the
    middle of other errors. Closes #13279.

commit 4c1fdd065b28b85d879a01870525e2f0699262e9
Author: Kevin Ballard <kevin@sb.org>
Date:   Fri Jul 4 14:09:47 2014 -0700

    vim: set Rust tab conventions

commit 9deeaefdbb8ffeec69439e271a97f4cce617da20
Author: Phil Dawes <phil@phildawes.net>
Date:   Fri Jul 4 21:46:39 2014 +0100

    Parser: fix PatIdent span bug

    Fix small bug introduced in e38cb972dcf: PatIdent span was incorrect
    because self.last_span was being used before the ident token was
    parsed.

commit 9897160523ab3e792f0309250da49d289d2a5598
Merge: 935da07 db44468
Author: bors <bors@rust-lang.org>
Date:   Fri Jul 4 20:46:38 2014 +0000

    auto merge of #15412 : dotdash/rust/builder, r=alexcrichton

commit 45e52a13e818f8822e40e8dbc775fa86acac2269
Author: Adolfo Ochagavía <aochagavia92@gmail.com>
Date:   Fri Jul 4 22:36:27 2014 +0200

    Removed unnecessary method in test

commit cc13f9bae8b4175513375f9de66f198a706c67d3
Author: John Clements <clements@racket-lang.org>
Date:   Thu Jul 3 17:20:25 2014 -0700

    implement hygiene for ExprFnBlock and ExprProc

commit ff9995e08978cec4b6987d198e09ac5ba6b6c152
Author: John Clements <clements@racket-lang.org>
Date:   Fri Jul 4 11:02:17 2014 -0700

    added test cases for closure arg hygiene

commit 63fb7c6f4049ba33cb2fcd5d5d117a3e484bd181
Author: John Clements <clements@racket-lang.org>
Date:   Fri Jul 4 10:57:28 2014 -0700

    comments only

commit 3e99309bfc318c13e4ac82cf086b26d694f9c53c
Author: John Clements <clements@racket-lang.org>
Date:   Thu Jul 3 13:10:54 2014 -0700

    make any_pat! and u64_from_be_bytes_bench_impl! macros hygienic

commit 0ba15c99f31f769bd015871202000e48c77066ca
Author: John Clements <clements@racket-lang.org>
Date:   Fri Jul 4 12:19:15 2014 -0700

    hygiene for item fn args

    also, introduce fn_decl_arg_bindings and expand_and_rename abstractions

commit 92708322fd19747100ff5eda2e4584bc9d1f2b38
Author: John Clements <clements@racket-lang.org>
Date:   Fri Jul 4 12:18:37 2014 -0700

    comments & test cases for IdentRenamers

commit 6bee3c87c94a39fb7d48a119bbc105149c345bfc
Author: John Clements <clements@racket-lang.org>
Date:   Fri Jul 4 12:15:24 2014 -0700

    use PatIdentRenamer for match bindings

commit 35175f015ff878d49e3b5562fe3a7addcef25cfc
Author: John Clements <clements@racket-lang.org>
Date:   Wed Jul 2 23:17:10 2014 -0700

    comments only

commit aa91ef0cf814a35037bc562fa37c51549fcf2984
Author: John Clements <clements@racket-lang.org>
Date:   Thu Jul 3 14:38:59 2014 -0700

    new_mark -> apply_mark, new_rename -> apply_rename

commit b8cd7f7c6df3581df92c2dc51ca23770f468de40
Author: John Clements <clements@racket-lang.org>
Date:   Wed Jul 2 23:16:01 2014 -0700

    add PatIdentRenamer

commit 9fdaa948c03a33e703eb5830dbed82ee2afe5101
Author: John Clements <clements@racket-lang.org>
Date:   Wed Jul 2 22:38:30 2014 -0700

    move RenameList to mtwt, add new_renames abstraction

commit f126eacd115415b0814ceb4a1c71380a0b2eb752
Author: John Clements <clements@racket-lang.org>
Date:   Fri Jul 4 12:05:43 2014 -0700

    comments, whitespace, rename NameFinderContext to PatIdentFinder

commit 935da0739e71c5581e5e6abb564e18f894e0ec04
Merge: 25e8b6e 29ec2506
Author: bors <bors@rust-lang.org>
Date:   Fri Jul 4 19:01:33 2014 +0000

    auto merge of #15405 : pcwalton/rust/delifetime, r=nick29581

    This was parsed by the parser but completely ignored; not even stored in
    the AST!

    This breaks code that looks like:

        static X: &'static [u8] = &'static [1, 2, 3];

    Change this code to the shorter:

        static X: &'static [u8] = &[1, 2, 3];

    Closes #15312.

    [breaking-change]

    r? @nick29581

commit 83f9f07ec4a339a31650abf7023a584cf7c5ce54
Author: Erick Tryzelaar <erick.tryzelaar@gmail.com>
Date:   Fri Jul 4 11:08:38 2014 -0700

    serialize: Remove allocations from escaping strs and indenting spaces

commit 25e8b6ed9c9cf60448eb95a0e8a42330ed44f479
Merge: c9e2ca0 2bd826c
Author: bors <bors@rust-lang.org>
Date:   Fri Jul 4 17:16:29 2014 +0000

    auto merge of #15404 : vhbit/rust/ios-ptr-fixes, r=pcwalton

commit c9e2ca0dfad8f2aff48c64887b1ec4276929eced
Merge: 04ac2b0 a34fd5a
Author: bors <bors@rust-lang.org>
Date:   Fri Jul 4 15:31:27 2014 +0000

    auto merge of #15051 : retep998/rust/master, r=alexcrichton

    This implementation does have the minor issue of not handling things correctly when a codepoint is split across multiple writes or reads, but its better than not having unicode support at all.

    Adds a Windows specific struct `WindowsTTY` in `libnative` and make `tty_open` create that struct on Windows. Adds needed functions and constants to `c_win32.rs`.

    Libuv still needs to be updated before #15028 can be closed.

commit a34fd5a1bb76256770b95dad16b9fc237fec254b
Author: Peter Atashian <retep998@gmail.com>
Date:   Fri Jul 4 10:45:28 2014 -0400

    windows: Unicode console support.
    Adds a WindowsTTY for libnative that converts between UTF-8 and UTF-16.

    Signed-off-by: Peter Atashian <retep998@gmail.com>

commit 4c9cca41a8eb381e06c744b40b5b915a516ec711
Author: dgoon <dgoon@dgoon.net>
Date:   Fri Jul 4 23:43:16 2014 +0900

    add a missing closing parens

commit 04ac2b087e10c8d23e41d5f910ea2069e77c9e73
Merge: c0b76ab b86440f
Author: bors <bors@rust-lang.org>
Date:   Fri Jul 4 13:46:25 2014 +0000

    auto merge of #15403 : vhbit/rust/ios-llvm-fixme, r=pcwalton

    It was required to get iOS compilable but since
    that time a couple of changes were introduced
    which cause the same bug to re-appear and broke
    build anyway. Fixing all of them doesn’t look a
    viable alternative to me as it will pollute the
    code too much.

    So it should be fixed from LLVM side and I hope
    LLVM will upstream corresponding changes in a
    month.

    Meanwhile, who wants to play with Rust on iOS is
    better to use a fork which uses patched LLVM:
    https://github.com/vhbit/rust/tree/ios . It may
    lag behind master a bit, but it is Travis-checked
    to compile successfully.

commit a4b1361a0102d4bc0f473b560d62819f28cf4c4b
Author: Zbigniew Siciarz <antyqjon@gmail.com>
Date:   Fri Jul 4 15:23:17 2014 +0200

    Fixed Result type parameters in doc comment.

commit b87349995820981fd772bfb8b4d8af675c00a930
Author: mitchmindtree <mitchell.nordine@gmail.com>
Date:   Fri Jul 4 23:21:56 2014 +1000

    Implemented Show for RefCell

commit db44468de0998814446fbca8b88ed57a5bf301b0
Author: Björn Steinbrink <bsteinbr@gmail.com>
Date:   Fri Jul 4 14:50:36 2014 +0200

    trans::foreign: Simplify some code by using our builder impl

commit 30bd63da428b4b27e6c13f739145318a9db68298
Author: mitchmindtree <mitchell.nordine@gmail.com>
Date:   Fri Jul 4 22:34:41 2014 +1000

    Fixed spacing and removed unnecessary comment.

commit c0b76abf91aa204be0cb9336988eec48d91bcfd7
Merge: 36d7d74 c2c27fa
Author: bors <bors@rust-lang.org>
Date:   Fri Jul 4 12:01:22 2014 +0000

    auto merge of #15388 : jakub-/rust/issue-12285, r=pcwalton

    Unit-like struct patterns are irrefutable, no need for a branch.

    And some cleanup while I'm at it.

commit 29ec2506abb1d382e432cae2519aa7b7695c276a
Author: Patrick Walton <pcwalton@mimiga.net>
Date:   Fri Jul 4 00:56:57 2014 -0700

    librustc: Remove the `&LIFETIME EXPR` production from the language.

    This was parsed by the parser but completely ignored; not even stored in
    the AST!

    This breaks code that looks like:

        static X: &'static [u8] = &'static [1, 2, 3];

    Change this code to the shorter:

        static X: &'static [u8] = &[1, 2, 3];

    Closes #15312.

    [breaking-change]

commit b86440f85f195b73c656092d4f5ecefcd19fec71
Author: Valerii Hiora <valerii.hiora@gmail.com>
Date:   Fri Jul 4 10:40:21 2014 +0300

    Removed LLVM bug workaround

    It was required to get iOS compilable but since
    that time a couple of changes were introduced
    which cause the same bug to re-appear and broke
    build anyway. Fixing all of them doesn’t look a
    viable alternative to me as it will pollute the
    code too much.

    So it should be fixed from LLVM side and I hope
    LLVM will upstream corresponding changes in a
    month.

    Meanwhile, who wants to play with Rust on iOS is
    better to use a fork which uses patched LLVM:
    https://github.com/vhbit/rust/tree/ios . It may
    lag behind master a bit, but it is Travis-checked
    to compile successfully.

commit 2bd826cac267442a3d1d817c8f5adba564e4e83f
Author: Valerii Hiora <valerii.hiora@gmail.com>
Date:   Mon Jun 30 09:51:58 2014 +0300

    Fixed iOS build after *T removal

commit 4703bb4eaa157ede1885bbfdb8839d749d2d8108
Author: Kevin Butler <haqkrs@gmail.com>
Date:   Thu Jun 26 16:43:32 2014 +0100

    liburl: Generic input for {en,de}code.

commit 465ec239184ea3aa24fb6108d6d78901e3f84b94
Author: Kevin Butler <haqkrs@gmail.com>
Date:   Wed Jun 25 23:51:36 2014 +0100

    liburl: cosmetic test changes.

commit feaad623a12aeb1ce4ee3dabf251e36ccdfe7107
Author: Kevin Butler <haqkrs@gmail.com>
Date:   Mon Jun 23 23:13:11 2014 +0100

    liburl: Remove some unnecessary allocations.

    Some signatures have changed from String to &str returns.

    To fix, call to_string() on the returned value.

    [breaking-change]

commit 4358bf8bfa1bfc853b51c29d48a2d57eb8dfee0a
Author: John Clements <clements@racket-lang.org>
Date:   Mon Jun 30 12:42:33 2014 -0700

    simplify and uncomment item-fn-arg hygiene unit test

commit 11b093425d44b9e14c4c3cace4d7ee691c56e25b
Author: Kevin Butler <haqkrs@gmail.com>
Date:   Sat Jun 21 00:42:21 2014 +0100

    liburl: Simplify encoding/decoding using iterators.

commit ed47c479d73fd7b57d3b493e03c74e2932733163
Author: Kevin Butler <haqkrs@gmail.com>
Date:   Sat Jun 21 00:05:06 2014 +0100

    liburl: remove redundant fields in Url.

    url.path - Now a Path instead of a String.

    To fix old code:
    url.path => url.path.path
    url.query => url.path.query
    url.fragment => url.path.fragment

    Not much point having the Path struct if it's not going to be used.

    [breaking-change]

commit a9e82e145e61f4b9825b4622f78ea9364387ae70
Author: Kevin Butler <haqkrs@gmail.com>
Date:   Fri Jun 20 01:30:12 2014 +0100

    liburl: rename and move path_from_str to Path::parse_str.

    url::path_from_str => url::Path::parse_str

    The FromStr trait still works, but its confusing to have a path_from_str
    free function that retuns a Result, while the regular from_str style
    functions return an Option, hence the rename to indicate a Result.

    [breaking-change]

commit 2194fd7569b227ba083c4f27e156af939e061c1b
Author: Kevin Butler <haqkrs@gmail.com>
Date:   Fri Jun 20 01:11:32 2014 +0100

    liburl: rename and move from_str to Url::parse_str.

    url::from_str => url::Url::parse_str

    The FromStr trait still works, but its confusing to have a from_str
    free function that retuns a Result, while the regular from_str
    returns an Option, hence the rename.

    [breaking-change]

commit c2c27faa35212eea653c7095cca6817be6c48fb1
Author: Jakub Wieczorek <jakub@jakub.cc>
Date:   Thu Jul 3 22:53:20 2014 +0200

    Fix #12285

    Unit-like struct patterns are irrefutable, no need for a branch.

commit 8ef0165a56bc788968fcec6debb510b58134f0d9
Author: Andrew Poelstra <apoelstra@wpsoftware.net>
Date:   Wed Jul 2 11:10:32 2014 -0700

    collections::bitv: clean up and unit test `BitvSet::is_subset`

commit 78b674152ed09f2e7f30f0080171b43e11f56f31
Author: Andrew Poelstra <apoelstra@wpsoftware.net>
Date:   Wed Jul 2 10:17:27 2014 -0700

    collections::bitv: change constructors for `Bitv` and `BitvSet`

    `Bitv::new` has been renamed `Bitv::with_capacity`. The new function
    `Bitv::new` now creates a `Bitv` with no elements.

    The new function `BitvSet::with_capacity` creates a `BitvSet` with
    a specified capacity.

commit 9eb81edfea77603b1cf742817dd46a8b1ec0455e
Author: Andrew Poelstra <apoelstra@wpsoftware.net>
Date:   Mon Jun 30 10:53:52 2014 -0700

    collections::bitv: Implement several methods for `Bitv` and `BitvSet`

    On Bitv:
       - Add .push() and .pop() which take and return bool, respectively
       - Add .truncate() which truncates a Bitv to a specific length
       - Add .grow() which grows a Bitv by a specific length
       - Add .reserve() which grows the underlying storage to be able to hold
         a specified number of bits without resizing
       - Implement FromIterator<Vec<bool>>
       - Implement Extendable<bool>
       - Implement Collection
       - Implement Mutable
       - Remove .from_bools() since FromIterator<Vec<bool>> now accomplishes this.
       - Remove .assign() since Clone::clone_from() accomplishes this.

    On BitvSet:
       - Add .reserve() which grows the underlying storage to be able to hold
         a specified number of bits without resizing
       - Add .get_ref() and .get_mut_ref() to return references to the
         underlying Bitv

commit b5c54df59fa0a99fa860db82e6e82f9c0fbd7115
Author: Andrew Poelstra <apoelstra@wpsoftware.net>
Date:   Mon Jun 30 09:41:23 2014 -0700

    collections::bitv: Add documentation and #[inline]'s

    Add documentation to methods on BitvSet that were missing them. Also
    make sure #[inline] is on all methods that are (a) one-liners or (b)
    private methods whose only purpose is code deduplication.

commit a7f335a09ccfa0777847cd7b36d117322b965ad1
Author: Andrew Poelstra <apoelstra@wpsoftware.net>
Date:   Mon Jun 30 08:25:11 2014 -0700

    collections::bitv: replace internal iterators with external ones

commit da0d4be378d289e9e90a48deec674d42205ae4c9
Author: Andrew Poelstra <apoelstra@wpsoftware.net>
Date:   Mon Jun 30 07:25:58 2014 -0700

    collections::bitv: remove some ancient interfaces

    Removes the following methods from `Bitv`:

      - `to_vec`: translates a `Bitv` into a bulky `Vec<uint>` of 0's and 1's
        replace with:  `bitv.iter().map(|b| if b {1} else {0}).collect()`

      - `to_bools`: translates a `Bitv` into a `Vec<bool>`
        replace with: `bitv.iter().collect()`

      - `ones`: internal iterator over all 1 bits in a `Bitv`
        replace with: `BitvSet::from_bitv(bitv).iter().advance(fn)`

    These methods had specific functionality which can be replicated more
    generally by the modern iterator system. (Also `to_vec` was not even
    unit tested!)

commit 7a7ae993ce694bf75a11632b394916e055a4d8ec
Author: Andrew Poelstra <apoelstra@wpsoftware.net>
Date:   Mon Jun 30 13:05:05 2014 -0700

    collections::bitv: correct use of Vec<T>::grow

    The argument passed to Vec::grow is the number of elements to grow
    the vector by, not the target number of elements. The old `Bitv`
    code did the wrong thing, allocating more memory than it needed to.

commit a698b81ebfe02a614f9b41e68c6b604597a81229
Author: Andrew Poelstra <apoelstra@wpsoftware.net>
Date:   Wed Jul 2 08:24:55 2014 -0700

    collections::bitv: ensure correct masking behaviour

    The internal masking behaviour for `Bitv` is now defined as:
      - Any entirely words in self.storage must be all zeroes.
      - Any partially used words may have anything at all in their
        unused bits.

    This means:
      - When decreasing self.nbits, care must be taken that any
        no-longer-used words are zeroed out.

      - When increasing self.nbits, care must be taken that any
        newly-unmasked bits are set to their correct values.

      - When reading words, care should be taken that the values of
        unused bits are not used. (Preferably, use `Bitv::mask_words`
        which zeroes them out for you.)

    The old behaviour was that every unused bit was always set to
    zero. The problem with this is that unused bits are almost never
    read, so forgetting to do this will result in very subtle and
    hard-to-track down bugs. This way the responsibility for masking
    falls on the places which might cause unused bits to be read: for
    now, this is only `Bitv::mask_words` and `BitvSet::insert`.

commit 2d23319e334a4fa1a6ec440b2cb0e48d0cadc542
Author: Andrew Poelstra <apoelstra@wpsoftware.net>
Date:   Mon Jun 30 06:43:39 2014 -0700

    collections::bitv: Remove SmallBitv/BigBitv dichotomy

    The old `Bitv` structure had two variations: one represented by a vector of
    uints, and another represented by a single uint for bit vectors containing
    fewer than uint::BITS bits.

    The purpose of this is to avoid the indirection of using a Vec, but the
    speedup is only available to users who

      (a) are storing less than uints::BITS bits
      (b) know this when they create the vector (since `Bitv`s cannot be resized)
      (c) don't know this at compile time (else they could use uint directly)

    Giving such specific users a (questionable) speed benefit at the cost of
    adding explicit checks to almost every single bit call, frequently writing
    the same method twice and making iteration much much more difficult, does
    not seem like a worthwhile tradeoff to me.

    Also, rustc does not use Bitv anywhere, only through BitvSet, which does
    not have this optimization.

    For reference, here is some speed data from before and after this PR:

    BEFORE:
    test bitv::tests::bench_bitv_big        ... bench:     4 ns/iter (+/- 1)
    test bitv::tests::bench_bitv_big_iter   ... bench:  4858 ns/iter (+/- 22)
    test bitv::tests::bench_bitv_big_union  ... bench:   507 ns/iter (+/- 35)
    test bitv::tests::bench_bitv_set_big    ... bench:     6 ns/iter (+/- 1)
    test bitv::tests::bench_bitv_set_small  ... bench:     6 ns/iter (+/- 0)
    test bitv::tests::bench_bitv_small      ... bench:     5 ns/iter (+/- 1)
    test bitv::tests::bench_bitvset_iter    ... bench: 12930 ns/iter (+/- 662)
    test bitv::tests::bench_btv_small_iter  ... bench:    39 ns/iter (+/- 1)
    test bitv::tests::bench_uint_small      ... bench:     4 ns/iter (+/- 1)

    AFTER:
    test bitv::tests::bench_bitv_big        ... bench:     5 ns/iter (+/- 1)
    test bitv::tests::bench_bitv_big_iter   ... bench:  5004 ns/iter (+/- 102)
    test bitv::tests::bench_bitv_big_union  ... bench:   356 ns/iter (+/- 26)
    test bitv::tests::bench_bitv_set_big    ... bench:     6 ns/iter (+/- 0)
    test bitv::tests::bench_bitv_set_small  ... bench:     6 ns/iter (+/- 1)
    test bitv::tests::bench_bitv_small      ... bench:     4 ns/iter (+/- 1)
    test bitv::tests::bench_bitvset_iter    ... bench: 12918 ns/iter (+/- 621)
    test bitv::tests::bench_btv_small_iter  ... bench:    50 ns/iter (+/- 5)
    test bitv::tests::bench_uint_small      ... bench:     4 ns/iter (+/- 1)

commit a4c0468a21ce48998310947869dcf028ee468b8d
Author: Andrew Poelstra <asp11@sfu.ca>
Date:   Mon Jun 23 17:35:43 2014 -0700

    collections::bitv: implement BitvSet directly as a Bitv
Merge remote-tracking branch 'upstream/master'
Merge branch 'master' of https://github.com/mitchmindtree/rust