#error #chain #git #dumb


Faux' apt package manager for Debian

1 unstable release

Uses old Rust 2015

0.1.0 Jan 20, 2018

Used in fapt-pkg

CC0 license


error-chain for dumb IDEs

This library contains a massive hack to make using certain IDEs cope less poorly with error-chain heavy code.


error-chain is the error handling library for Rust. If you're not using it, you're doing it wrong.

However, it makes heavy use of Rust's macro system, which is not well understood by some IDEs.

This library provides a set of stubs which makes the IDEs slightly less dumb, and hence your experience slightly less awful.

Without it, completion fails for code like:

let a = foo().chain_err(|| "foo failed :(")?;
a. // <-- here.

Afterwards, it succeeds!


  1. Add this crate as a dependency. dev-dependencies is fine:

    git = "https://github.com/FauxFaux/error-chain-for-dumb-ides"

    As crates.io packages' dependencies cannot be from git repositories, you can use the crates.io published version. I do not plan to maintain support for old versions, even in git HEAD. To do this, instead use this fragment:

    version = "0"
  2. Import the crate. You can do this behind a nonsense cfg, as this is just totally ignored by the IDE, and the code is run anyway:

    extern crate error_chain_for_dumb_ides;
  3. Inside your mod errors {}, import the crate's contents:

    pub use error_chain_for_dumb_ides::stubs::*;

That's it! Now, suddenly, completion starts to work.

Here's an example of doing this in a real project.



Think "public domain", no rights reserved. Given this library is trivial, and never part of your production codebase anyway, any license is practically irrelevant anyway.

No runtime deps