Auto merge of #4795 - alexcrichton:failure, r=withoutboats
authorbors <bors@rust-lang.org>
Tue, 19 Dec 2017 02:48:27 +0000 (02:48 +0000)
committerbors <bors@rust-lang.org>
Tue, 19 Dec 2017 02:48:27 +0000 (02:48 +0000)
Start migration to the `failure` crate

This commit is the initial steps to migrate Cargo's error handling from the
`error-chain` crate to the `failure` crate. This is intended to be a low-cost
(in terms of diff) transition where possible so it's note "purely idiomatic
`failure` crate" just yet.

The `error-chain` dependency is dropped in this commit and Cargo now canonically
uses the `Error` type from the `failure` crate. The main last remnant of
`error-chain` is a custom local extension trait to use `chain_err` instead of
`with_context`. I'll try to follow up with a commit that renames this later but
I wanted to make sure everything worked first! (and `chain_err` is used
practically everywhere).

Some minor tweaks happened in the tests as I touched up a few error messages
here and there but overall the UI of Cargo should be exactly the same before and
after this commit.

1  2 
src/cargo/sources/registry/mod.rs
src/cargo/sources/registry/remote.rs

Simple merge
Simple merge