Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

bail!() no longer works with quicli 0.4 #106

Open
gibfahn opened this issue Jan 16, 2019 · 1 comment
Open

bail!() no longer works with quicli 0.4 #106

gibfahn opened this issue Jan 16, 2019 · 1 comment

Comments

@gibfahn
Copy link

gibfahn commented Jan 16, 2019

I think this is caused by rust-lang-deprecated/failure#258 and rust-lang-deprecated/failure#110, but I thought it worth mentioning, as I hit this upgrading from quicli 0.3 to 0.4.

I'm not sure there's anything that can be done in this crate though, so feel free to close if you want.

Reproduction:

Source

use quicli::prelude::*;

fn main() -> CliResult {
    bail!("This does not work!");
}

Reproduction

cargo new quicli_bail; cd quicli_bail
cargo install cargo-edit
cargo add quicli
echo -e 'use quicli::prelude::*;\n\nfn main() -> CliResult {\n    bail!("This does not work!");\n}' >src/main.rs
cargo build

Result:

   Compiling test_quicli v0.1.0 (/Users/gib/tmp/test_quicli)
error[E0308]: mismatched types
 --> src/main.rs:4:5
  |
4 |     bail!("This doesn't work!");
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `exitfailure::ExitFailure`, found struct `failure::error::Error`
  |
  = note: expected type `exitfailure::ExitFailure`
             found type `failure::error::Error`
  = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.
error: Could not compile `test_quicli`.

To learn more, run the command again with --verbose.
@h-michael
Copy link
Contributor

h-michael commented Jan 16, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants