Skip to content

Instantly share code, notes, and snippets.

@kw217
Created June 2, 2017 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kw217/feecc37fd70b4700a348715c1912efc3 to your computer and use it in GitHub Desktop.
Save kw217/feecc37fd70b4700a348715c1912efc3 to your computer and use it in GitHub Desktop.
Failing example - error_chains can't cope with doc comments on links
//! Test crate
#![warn(missing_docs)]
#[macro_use]
extern crate error_chain;
/// Root errors
pub mod errors {
error_chain!{
links {
/// Doc comment for links
LinkedError(super::databases::Error, super::databases::ErrorKind);
}
}
}
use self::errors::*;
mod databases {
/// Database errors
mod errors {
error_chain! {
errors {
/// Doc comment for internal error
InternalError {
description("The database reported an internal error")
display("Database internal error")
}
}
}
}
pub use self::errors::*;
}
/// Main entry point
pub fn run() -> Result<()> {
Ok(())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment