Created
June 2, 2017 11:09
-
-
Save kw217/feecc37fd70b4700a348715c1912efc3 to your computer and use it in GitHub Desktop.
Failing example - error_chains can't cope with doc comments on links
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! 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